Révision 213 pobysoPythonSage/src/pobyso.py
pobyso.py (revision 213) | ||
---|---|---|
326 | 326 |
polyFloatSa = polySa |
327 | 327 |
precSa = polySa.parent().base_ring().precision() |
328 | 328 |
## Get exponents and coefficients. |
329 |
exponentSa = polyFloatSa.exponents() |
|
329 |
exponentsSa = polyFloatSa.exponents()
|
|
330 | 330 |
coefficientsSa = polyFloatSa.coefficients() |
331 | 331 |
## Build the polynomial. |
332 | 332 |
polySo = None |
333 |
for coefficientSa, exponentSa in zip(coefficientsSa, exponentSa): |
|
333 |
for coefficientSa, exponentSa in zip(coefficientsSa, exponentsSa):
|
|
334 | 334 |
#print coefficientSa.n(prec=precSa), exponentSa |
335 | 335 |
coefficientSo = \ |
336 | 336 |
pobyso_constant_sa_so(coefficientSa) |
... | ... | |
704 | 704 |
Convert a Sollya polynomial into a Sage polynomial. |
705 | 705 |
Legacy function. Use pobyso_float_poly_so_sa() instead. |
706 | 706 |
""" |
707 |
return pobyso_float_poly_so_sa(polySo,realField) |
|
707 |
return pobyso_float_poly_so_sa(polySo,realFieldSa)
|
|
708 | 708 |
# End pobyso_get_poly_so_sa |
709 | 709 |
|
710 | 710 |
def pobyso_get_prec(): |
... | ... | |
783 | 783 |
#pobyso_autoprint(sollyaExp) |
784 | 784 |
operatorSa = pobyso_get_head_function_so_sa(sollyaExpSo) |
785 | 785 |
sollyaLibFreeVariableName = sollya_lib_get_free_variable_name() |
786 |
## Get rid of the "_"'s in "_x_", if any. |
|
787 |
sollyaLibFreeVariableName = re.sub('_', '', sollyaLibFreeVariableName) |
|
786 | 788 |
# Constants and the free variable are special cases. |
787 | 789 |
# All other operator are dealt with in the same way. |
788 | 790 |
if (operatorSa != SOLLYA_BASE_FUNC_CONSTANT) and \ |
... | ... | |
1079 | 1081 |
## Create a Sage polynomial in the "right" precision. |
1080 | 1082 |
P_RRR = RRR[polySa.variables()[0]] |
1081 | 1083 |
polyFloatSa = P_RRR(polySa) |
1082 |
## Make sure no precision is provided. |
|
1084 |
## Make sure no precision is provided: pobyso_float_poly_sa_so will |
|
1085 |
# recover it all by itself and not make an extra conversion. |
|
1083 | 1086 |
return pobyso_float_poly_sa_so(polyFloatSa) |
1084 | 1087 |
|
1085 | 1088 |
# End pobyso_rat_poly_sa_so |
Formats disponibles : Unified diff