Révision 103
pobysoPythonSage/src/pobyso.py (revision 103) | ||
---|---|---|
1010 | 1010 |
pobyso_get_list_elements_so_so(taylorFormSo) |
1011 | 1011 |
polySo = sollya_lib_copy_obj(taylorFormListSo[0]) |
1012 | 1012 |
errorRangeSo = taylorFormListSo[2] |
1013 |
# No copy_obj needed here: a new object is created. |
|
1013 | 1014 |
maxErrorSo = sollya_lib_sup(errorRangeSo) |
1014 | 1015 |
# If changed, reset the Sollya working precision. |
1015 | 1016 |
if not sollyaPrecSo is None: |
... | ... | |
1018 | 1019 |
if errorTypeIsNone: |
1019 | 1020 |
sollya_lib_clear_obj(errorTypeSo) |
1020 | 1021 |
sollya_lib_clear_obj(taylorFormSo) |
1021 |
# Do not clear maxErrorSo. |
|
1022 |
for element in taylorFormListSo: |
|
1023 |
sollya_lib_clear_obj(element) |
|
1024 |
# Those are cleared with taylorForSo. |
|
1025 |
#sollya_lib_clear_obj(numElementsSo) |
|
1026 |
#sollya_lib_clear_obj(isEndEllipticSo) |
|
1022 | 1027 |
return((polySo, intervalCenterSo, maxErrorSo)) |
1023 | 1028 |
# end pobyso_taylor_expansion_no_change_var_so_so |
1024 | 1029 |
|
pobysoPythonSage/src/sageSLZ/sagePolynomialOperations.sage (revision 103) | ||
---|---|---|
140 | 140 |
return norm |
141 | 141 |
# For other norms |
142 | 142 |
for coefficient in poly.coefficients(): |
143 |
norm += (coefficient^p).abs()
|
|
143 |
norm += coefficient.abs()^p
|
|
144 | 144 |
return pow(norm, 1/p) |
145 | 145 |
# end spo_norm |
146 | 146 |
|
pobysoPythonSage/src/sageSLZ/sageMatrixOperations.sage (revision 103) | ||
---|---|---|
94 | 94 |
return minNonNull |
95 | 95 |
# End smo_min_non_null_abs |
96 | 96 |
|
97 |
def smo_transformation_row_matrix_strings(varPrefixString,matrix): |
|
97 |
def smo_transformation_row_matrix_strings(varPrefixString, matrix):
|
|
98 | 98 |
m = matrix.nrows() |
99 | 99 |
if m == 0 : |
100 | 100 |
return None |
pobysoPythonSage/src/sageSLZ/sageSLZ.sage (revision 103) | ||
---|---|---|
95 | 95 |
scaled back by dividing by the "right" powers of the variables bounds. |
96 | 96 |
|
97 | 97 |
The elements in knownMonomials must be of the "right" polynomial type. |
98 |
They set the polynomial type of the output polynomials list. |
|
98 | 99 |
""" |
99 | 100 |
|
100 | 101 |
# TODO: check input arguments. |
... | ... | |
467 | 468 |
Makes a variable substitution into the input polynomial so that the output |
468 | 469 |
polynomial can take integer arguments. |
469 | 470 |
All variables of the input polynomial "have precision p". That is to say |
470 |
that they are rationals with denominator == 2^precision: x = y/2^precision |
|
471 |
that they are rationals with denominator == 2^(precision - 1): |
|
472 |
x = y/2^(precision - 1). |
|
471 | 473 |
We "incorporate" these denominators into the coefficients with, |
472 | 474 |
respectively, the "right" power. |
473 | 475 |
""" |
Formats disponibles : Unified diff