Révision 59

pobysoPythonSage/src/pobyso.py (revision 59)
31 31
from ctypes import *
32 32
import re
33 33
from sage.symbolic.expression_conversions import polynomial
34
from sage.symbolic.expression_conversions import PolynomialConverter
34 35
"""
35 36
Create the equivalent to an enum for the Sollya function types.
36 37
"""
......
498 499
    - (optional) compute the RealField of the coefficients;
499 500
    - convert the Sollya expression into a Sage expression;
500 501
    - convert the Sage expression into a Sage polynomial
502
    TODO: the canonical thing for the polynomial.
501 503
    """    
502 504
    if realFieldSa is None:
503 505
        expressionPrecSa = pobyso_get_max_prec_of_exp_so_sa(polySo)
......
505 507
    
506 508
    expressionSa = pobyso_get_sage_exp_from_sollya_exp_so_sa(polySo, \
507 509
                                                             realFieldSa)
510
    print "ssssss: ", expressionSa
508 511
    polyVariableSa = expressionSa.variables()[0]
509
    polyRingSa = realFieldSa[polyVariableSa]
510
    polynomialSa = polynomial(expressionSa, polyRingSa)
512
    print type(str(polyVariableSa))
513
    polyRingSa = realFieldSa[str(polyVariableSa)]
514
    print polyRingSa
515
    polynomialSa = polynomial(polyVariableSa, ring=polyRingSa)
516
    print polyRingSa.base()
517
    print "tttttt: ", polynomialSa
511 518
    return(polynomialSa)
512 519
# End pobyso_get_sage_poly_from_sollya_poly
513 520

  

Formats disponibles : Unified diff