Révision 246
pobysoPythonSage/src/sollya_lib.sage (revision 246) | ||
---|---|---|
128 | 128 |
try: |
129 | 129 |
sollya_lib_get_free_variable_name.restype = c_char_p |
130 | 130 |
except : |
131 |
print "\nOne of the Python-Sollya return type setting command has \
|
|
132 |
failed.\n"
|
|
131 |
sys.stderr.write("\nOne of the Python-Sollya return type setting command \n")
|
|
132 |
sys.stderr.write("has failed.\n\n")
|
|
133 | 133 |
sys.exit(1) |
134 | 134 |
# |
135 | 135 |
# Set the argument type of several functions. Default arguments are int. |
... | ... | |
173 | 173 |
sollya_lib_range_from_interval.argtypes = [c_ulong] |
174 | 174 |
sollya_lib_range_from_interval.restype = c_ulong |
175 | 175 |
except : |
176 |
print "\nOne of the Python-Sollya argument type setting command has \
|
|
177 |
failed.\n"
|
|
176 |
sys.stderr.write("\nOne of the Python-Sollya return type setting command \n")
|
|
177 |
sys.stderr.write("has failed.\n\n")
|
|
178 | 178 |
sys.exit(1) |
179 | 179 |
# |
180 | 180 |
# Give it a try! |
181 | 181 |
# |
182 | 182 |
sollya |
183 | 183 |
sollya.sollya_lib_init(None) |
184 |
print "\nSuperficial Sollya library check..."
|
|
184 |
sys.stderr.write("\nSuperficial Sollya library check...\n")
|
|
185 | 185 |
|
186 | 186 |
#print sollya.sollya_lib_get_free_variable_name() |
187 | 187 |
sollyaExp = sollya_lib_parse_string("exp(x)") |
... | ... | |
197 | 197 |
#print "Precision : ", a.value |
198 | 198 |
#print "Address of a.value ", addressof(a) |
199 | 199 |
#sollya_lib_close(None) |
200 |
print "...Sollya library check done."
|
|
200 |
sys.stderr.write("\t...Sollya library check done.\n")
|
|
201 | 201 |
# |
202 | 202 |
# |
203 | 203 |
# |
pobysoPythonSage/src/sageSLZ/sageNumericalOperations.sage (revision 246) | ||
---|---|---|
1 |
print "sageNumericalOperations: loading..." |
|
2 |
|
|
3 |
|
|
1 |
sys.stderr.write("sageNumericalOperations: loading...\n") |
|
2 |
# |
|
4 | 3 |
def sno_abs_is_power_of_two(number): |
5 | 4 |
""" |
6 | 5 |
Check if the absolute value of a number is power of 2. |
... | ... | |
9 | 8 |
""" |
10 | 9 |
return is_power_of_two(abs(number)) |
11 | 10 |
# End sno_abs_is_power_of_two(number): |
12 |
|
|
11 |
# |
|
13 | 12 |
def sno_float_to_rat_pow_of_two_denom(number): |
14 | 13 |
""" |
15 | 14 |
Convert a floating-point number into a rational where the denominator |
... | ... | |
26 | 25 |
return mantissa / 2^(-exponent) |
27 | 26 |
else: |
28 | 27 |
return -mantissa / 2^(-exponent) |
28 |
# End sno_float_to_rat_pow_of_two_denom. |
|
29 | 29 |
|
30 |
|
|
31 |
|
|
32 |
print "\t...sageNumericalOperations loaded." |
|
30 |
sys.stderr.write("\t...sageNumericalOperations loaded.\n") |
pobysoPythonSage/src/sageSLZ/sagePolynomialOperations.sage (revision 246) | ||
---|---|---|
1 | 1 |
load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageMatrixOperations.sage") |
2 | 2 |
#load(str('/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageMatrixOperations.sage')) |
3 |
print "sagePolynomialOperations loading..."
|
|
3 |
sys.stderr.write("sagePolynomialOperations loading...\n")
|
|
4 | 4 |
|
5 | 5 |
def spo_add_polynomial_coeffs_to_matrix_row(poly, |
6 | 6 |
knownMonomials, |
... | ... | |
1121 | 1121 |
return baseMatrix |
1122 | 1122 |
# End spo_proto_to_row_matrix. |
1123 | 1123 |
# |
1124 |
print "\t...sagePolynomialOperations loaded" |
|
1124 |
sys.stderr.write("\t...sagePolynomialOperations loaded.\n") |
pobysoPythonSage/src/sageSLZ/sageMatrixOperations.sage (revision 246) | ||
---|---|---|
1 |
print "sageMatrixOperations loading..."
|
|
1 |
sys.stderr.write("sageMatrixOperations loading...\n")
|
|
2 | 2 |
#2345678901234567890123456789012345678901234567890123456789012345678901234567890 |
3 | 3 |
def smo_is_diagonal_complete_matrix(mat): |
4 | 4 |
""" |
... | ... | |
145 | 145 |
|
146 | 146 |
# End smo_zero_rows_index_list |
147 | 147 |
|
148 |
print "\t...sageMatrixOperations loaded" |
|
148 |
sys.stderr.write("\t...sageMatrixOperations loaded.\n") |
pobysoPythonSage/src/sageSLZ/sageSLZ.sage (revision 246) | ||
---|---|---|
8 | 8 |
|
9 | 9 |
TODO:: |
10 | 10 |
""" |
11 |
print "sageSLZ loading..."
|
|
11 |
sys.stderr.write("sageSLZ loading...\n")
|
|
12 | 12 |
# |
13 | 13 |
import inspect |
14 | 14 |
# |
... | ... | |
2098 | 2098 |
return (poly1, poly2, resultantInElimVar) |
2099 | 2099 |
# End slz_resultant_tuple. |
2100 | 2100 |
# |
2101 |
print "\t...sageSLZ loaded" |
|
2101 |
sys.stderr.write("\t...sageSLZ loaded\n") |
|
2102 |
|
pobysoPythonSage/src/sageSLZ/sageRationalOperations.sage (revision 246) | ||
---|---|---|
7 | 7 |
Examples: |
8 | 8 |
TODO |
9 | 9 |
""" |
10 |
print "sageRationalOperations loading..."
|
|
10 |
sys.stderr.write("sageRationalOperations loading...\n")
|
|
11 | 11 |
def sro_denominators(rationalList = None): |
12 | 12 |
""" |
13 | 13 |
Compute the list of the denominators of a rational numbers list. |
... | ... | |
102 | 102 |
return numeratorsList |
103 | 103 |
# End sro_numerators |
104 | 104 |
|
105 |
print "\t...sageRationalOperations loaded" |
|
105 |
sys.stderr.write("\t...sageRationalOperations loaded.\n") |
pobysoPythonSage/src/sageSLZ/sageRunSLZ.sage (revision 246) | ||
---|---|---|
7 | 7 |
Examples: |
8 | 8 |
TODO |
9 | 9 |
""" |
10 |
print "sageRationalOperations loading..."
|
|
10 |
sys.stderr.write("sage Runtime SLZ loading...\n")
|
|
11 | 11 |
|
12 | 12 |
def srs_compute_lattice_volume(inputFunction, |
13 | 13 |
inputLowerBound, |
... | ... | |
3980 | 3980 |
print "Global CPU time:", globalCpuTime |
3981 | 3981 |
## Output counters |
3982 | 3982 |
# End srs_runSLZ-v06 |
3983 |
sys.stderr.write("\t...sage Runtime SLZ loaded.\n") |
pobysoPythonSage/src/pobyso.py (revision 246) | ||
---|---|---|
80 | 80 |
SOLLYA_BASE_FUNC_TAN, |
81 | 81 |
SOLLYA_BASE_FUNC_TANH, |
82 | 82 |
SOLLYA_BASE_FUNC_TRIPLEDOUBLE) = map(int,xrange(44)) |
83 |
print "\nSuperficial pobyso check..."
|
|
83 |
sys.stderr.write("Superficial pobyso check...\n")
|
|
84 | 84 |
#print "First constant - SOLLYA_BASE_FUNC_ABS: ", SOLLYA_BASE_FUNC_ABS |
85 | 85 |
#print "Last constant - SOLLYA_BASE_FUNC_TRIPLEDOUBLE: ", SOLLYA_BASE_FUNC_TRIPLEDOUBLE |
86 | 86 |
|
... | ... | |
2221 | 2221 |
#print "Max arity: ", pobyso_max_arity |
2222 | 2222 |
#print "Function tripleDouble (43) as a string: ", pobyso_function_type_as_string(43) |
2223 | 2223 |
#print "Function None (44) as a string: ", pobyso_function_type_as_string(44) |
2224 |
print "...Pobyso check done" |
|
2224 |
sys.stderr.write("\t...Pobyso check done.\n") |
Formats disponibles : Unified diff