Révision 281

pobysoPythonSage/src/sageMpfr.spyx (revision 281)
1 1
#cimport cython 
2 2
from libc.stdlib          cimport malloc,free
3
from libc.stdio cimport   printf
3 4
from sage.rings.real_mpfr cimport *
4 5
from sage.rings.real_mpfi cimport *
5 6
#
pobysoPythonSage/src/sollya_lib.sage (revision 281)
85 85
        sollya_lib_is_absolute = sollya.sollya_lib_is_absolute
86 86
        sollya_lib_is_empty_object_list = \
87 87
            sollya.sollya_lib_is_empty_object_list
88
        sollya_lib_obj_is_function = sollya.sollya_lib_obj_is_function
88 89
        sollya_lib_is_off = sollya.sollya_lib_is_off
89 90
        sollya_lib_is_on = sollya.sollya_lib_is_on
90 91
        sollya_lib_obj_is_range = sollya.sollya_lib_obj_is_range
......
93 94
        sollya_lib_name_free_variable = \
94 95
            sollya.sollya_lib_name_free_variable
95 96
        sollya_lib_obj_is_function = sollya.sollya_lib_obj_is_function
97
        sollya_lib_obj_is_range = sollya.sollya_lib_obj_is_range
98
        sollya_lib_obj_is_string = sollya.sollya_lib_obj_is_string
96 99
        sollya_lib_obj_is_list = sollya.sollya_lib_obj_is_list
97 100
        sollya_lib_obj_is_error = sollya.sollya_lib_obj_is_error
98 101
        sollya_lib_obj_is_range = sollya.sollya_lib_obj_is_range
......
163 166
            POINTER(c_int), POINTER(c_int)]
164 167
    sollya_lib_guessdegree.argtypes          = [c_ulong, c_ulong, c_ulong, \
165 168
            c_ulong, c_ulong]
166
    sollya_lib_guessdegree.restype           = c_ulong        
169
    sollya_lib_guessdegree.restype           = c_ulong  
170
#    sollya_lib_infnorm.argtypes              = [c_ulong, c_ulong, c_ulong]
171
    sollya_lib_infnorm.restypes              = c_ulong
167 172
    sollya_lib_name_free_variable.argtypes   = [POINTER(c_char)]
168 173
    sollya_lib_parse_string.restype          = c_long
169 174
    sollya_lib_prepend.argstypes             = [c_ulong, c_ulong]
pobysoPythonSage/src/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