Révision 281 pobysoPythonSage/src/pobyso.py
pobyso.py (revision 281) | ||
---|---|---|
1290 | 1290 |
""" |
1291 | 1291 |
sollya_lib_name_free_variable(freeVariableNameSa) |
1292 | 1292 |
|
1293 |
def pobyso_obj_is_function_so_sa(objSo): |
|
1294 |
""" |
|
1295 |
Check if an object is a function. |
|
1296 |
""" |
|
1297 |
if sollya_lib_obj_is_function(objSo) != 0: |
|
1298 |
return True |
|
1299 |
else: |
|
1300 |
return False |
|
1301 |
# End pobyso_obj_is_function_so_sa |
|
1302 |
|
|
1303 |
def pobyso_obj_is_range_so_sa(objSo): |
|
1304 |
""" |
|
1305 |
Check if an object is a function. |
|
1306 |
""" |
|
1307 |
if sollya_lib_obj_is_range(objSo) != 0: |
|
1308 |
return True |
|
1309 |
else: |
|
1310 |
return False |
|
1311 |
# End pobyso_obj_is_range_so_sa |
|
1312 |
|
|
1313 |
def pobyso_obj_is_string_so_sa(objSo): |
|
1314 |
""" |
|
1315 |
Check if an object is a function. |
|
1316 |
""" |
|
1317 |
if sollya_lib_obj_is_string(objSo) != 0: |
|
1318 |
return True |
|
1319 |
else: |
|
1320 |
return False |
|
1321 |
# End pobyso_obj_is_string_so_sa |
|
1322 |
|
|
1293 | 1323 |
def pobyso_parse_string(string): |
1294 | 1324 |
""" Legacy function. See pobyso_parse_string_sa_so. """ |
1295 | 1325 |
return pobyso_parse_string_sa_so(string) |
... | ... | |
1994 | 2024 |
sollya_lib_set_prec(newPrecSo) |
1995 | 2025 |
# End pobyso_set_prec_so_so. |
1996 | 2026 |
|
1997 |
def pobyso_inf_so_so(intervalSo):
|
|
2027 |
def pobyso_inf_so_so(rangeSo):
|
|
1998 | 2028 |
""" |
1999 | 2029 |
Very thin wrapper around sollya_lib_inf(). |
2000 | 2030 |
""" |
2001 |
return sollya_lib_inf(intervalSo)
|
|
2031 |
return sollya_lib_inf(rangeSo)
|
|
2002 | 2032 |
# End pobyso_inf_so_so. |
2003 | 2033 |
# |
2034 |
def pobyso_infnorm_sa_sa(funcSa, interevalSa): |
|
2035 |
""" |
|
2036 |
Very thin wrapper around sollya_lib_infnorm(). |
|
2037 |
We only take into account the 2 first arguments (the function and |
|
2038 |
the interval (a range). Managing the other arguments (the file for |
|
2039 |
the proof and the exclusion intervals list) will be performed later |
|
2040 |
Changes will be needed in sollya_lib.py file too. |
|
2041 |
""" |
|
2042 |
return sollya_lib_infnorm(funcSo, rangeSo, None) |
|
2043 |
# End pobyso_infnorm_so_so. |
|
2044 |
# |
|
2045 |
def pobyso_infnorm_so_so(funcSo, rangeSo): |
|
2046 |
""" |
|
2047 |
Very thin wrapper around sollya_lib_infnorm(). |
|
2048 |
We only take into account the 2 first arguments (the function and |
|
2049 |
the interval (a range). Managing the other arguments (the file for |
|
2050 |
the proof and the exclusion intervals list) will be performed later |
|
2051 |
Changes will be needed in sollya_lib.py file too. |
|
2052 |
""" |
|
2053 |
return sollya_lib_infnorm(funcSo, rangeSo, None) |
|
2054 |
# End pobyso_infnorm_so_so. |
|
2055 |
# |
|
2056 |
def pobyso_supnorm_sa_sa(poly): |
|
2057 |
""" |
|
2058 |
Computes the supremum norm from Sage input arguments and returns a |
|
2059 |
Sage floating-point number whose precision is set by the realFieldSa |
|
2060 |
argument. |
|
2061 |
TODO: complete this stub! |
|
2062 |
""" |
|
2063 |
print("This function does nothing!") |
|
2064 |
return None |
|
2065 |
# End pobyso_supnorm_sa_sa |
|
2066 |
|
|
2004 | 2067 |
def pobyso_supnorm_so_sa(polySo, funcSo, intervalSo, errorTypeSo = None,\ |
2005 | 2068 |
accuracySo = None, realFieldSa = None): |
2006 | 2069 |
""" |
2007 |
Computes the supremum norm from Solly input arguments and returns a |
|
2070 |
Computes the supremum norm from Sollya input arguments and returns a
|
|
2008 | 2071 |
Sage floating-point number whose precision is set by the only Sage argument. |
2009 | 2072 |
|
2010 | 2073 |
The returned value is the maximum of the absolute values of the range |
Formats disponibles : Unified diff