Révision 63 pobysoPythonSage/src/pobyso.py

pobyso.py (revision 63)
466 466
            "(" + pobyso_get_sage_exp_from_sollya_exp_so_sa(subexpressions[0], \
467 467
            realField) + ")")
468 468
        elif arity == 2:
469
            # We do not get through the preprocessor.
470
            # The "^" operator is then a special case.
469 471
            if operator == SOLLYA_BASE_FUNC_POW:
470 472
                operatorAsString = "**"
471 473
            else:
......
475 477
              eval("pobyso_get_sage_exp_from_sollya_exp_so_sa(subexpressions[0], realField)"\
476 478
              + " " + operatorAsString + " " + \
477 479
                   "pobyso_get_sage_exp_from_sollya_exp_so_sa(subexpressions[1], realField)")
478
        # We do not know yet how to deal with arity > 3 (is there any in Sollya anyway?).
480
        # We do not know yet how to deal with arity >= 3 
481
        # (is there any in Sollya anyway?).
479 482
        else:
480 483
            sageExp = eval('None')
481 484
        return(sageExp)
......
505 508
    if realFieldSa is None:
506 509
        expressionPrecSa = pobyso_get_max_prec_of_exp_so_sa(polySo)
507 510
        realFieldSa = RealField(expressionPrecSa)
511
    #print "Sollya expression before...",
512
    #pobyso_autoprint(polySo)
513

  
508 514
    expressionSa = pobyso_get_sage_exp_from_sollya_exp_so_sa(polySo, \
509 515
                                                             realFieldSa)
516
    #print "...Sollya expression after.",
517
    #pobyso_autoprint(polySo)
510 518
    polyVariableSa = expressionSa.variables()[0]
511 519
    polyRingSa = realFieldSa[str(polyVariableSa)]
512 520
    print polyRingSa
......
805 813
    if not sollyaPrecSo is None:
806 814
        sollya_lib_set_prec(initialPrecSo)
807 815
        sollya_lib_clear_obj(initailPrecSo)
808
    return([polyVarChangedSo, intervalCenterSo, maxErrorSo])
816
    return((polyVarChangedSo, intervalCenterSo, maxErrorSo))
809 817
# end pobyso_taylor_expansion_with_change_var_so_so
810 818

  
811 819
def pobyso_taylor_expansion_no_change_var_so_so(functionSo, degreeSo, rangeSo, \
......
832 840
    # If changed, reset the Sollya working precision.
833 841
    if not sollyaPrecSo is None:
834 842
        sollya_lib_set_prec(initialPrecSo)
835
        sollya_lib_clear_obj(initailPrecSo)
836
    return([polySo, intervalCenterSo, maxErrorSo])
843
        sollya_lib_clear_obj(initialPrecSo)
844
    return((polySo, intervalCenterSo, maxErrorSo))
837 845
# end pobyso_taylor_expansion_no_change_var_so_so
838 846

  
839 847
def pobyso_taylor(function, degree, point):

Formats disponibles : Unified diff