Révision 153

pobysoPythonSage/src/sollya_lib.sage (revision 153)
55 55
        sollya_lib_get_prec_of_constant = sollya.sollya_lib_get_prec_of_constant
56 56
        sollya_lib_get_prec_of_range = sollya.sollya_lib_get_prec_of_range
57 57
        sollya_lib_get_subfunctions = sollya.sollya_lib_get_subfunctions
58
        sollya_lib_guessdegree = sollya.sollya_lib_guessdegree
58 59
        sollya_lib_head = sollya.sollya_lib_head
59 60
        sollya_lib_inf = sollya.sollya_lib_inf
60 61
        sollya_lib_infnorm = sollya.sollya_lib_infnorm
pobysoPythonSage/src/testPobyso.sage (revision 153)
137 137
    sollya_lib_clear_obj(constSo)
138 138
# End test_pobyso_get_prec_of_constant_so_sa
139 139

  
140
def test_pobyso_guess_degree_so_sa(iterationsNum=10000):
141
    print "Running", inspect.stack()[0][3]
142
    funcExpSo = pobyso_parse_string_sa_so("exp(x)")
143
    RRIF = RealIntervalField(113)
144
    intervalSa = RRIF(3/8 - 2^-68, 3/8 + 2^-68)
145
    print ai.str(style='brackets')
146
    intervalSo = pobyso_interval_to_range_sa_so(intervalSa)
147
    errorSo = pobyso_constant_sa_so(2^-227)
148
    # Compute the other arguments...
149
    for index in xrange(0,iterationsNum):
150
        pass
151
# End test_pobyso_guess_degree
152

  
140 153
def test_pobyso_lib_init(iterationsNum=10000):
141 154
    """
142 155
    Must be called exactly once. Leaks lots of memory otherwise.
pobysoPythonSage/src/pobyso.py (revision 153)
765 765
    if retc == 0:
766 766
        return(None)
767 767
    return(int(prec.value))
768
# End pobyso_get_prec_of_range_so_sa()
768 769

  
770
def pobyso_guess_degree_so_sa(functionSo, rangeSo, errorSo, weightSo=None, \
771
                              degreeBoundsSo=None):
772
    # weightSo and degreeBoundsSo are optional arguments.
773
    if weightSo is None:
774
        degreeRangeSo = sollya_lib_guessdegree(functionSo, rangeSo, errorSo)
775
    elif degreeBounds is None:
776
        degreeRangeSo =  sollya_lib_guessdegree(functionSo, rangeSo, \
777
                                                errorSo, weightSo)
778
    else:
779
        degreeRangeSo =  sollya_lib_guessdegree(functionSo, rangeSo, errorSo, \
780
                                                weightSo, degreeBoundsSo)
781
    pobyso_range_to_interval_so_sa(degreeRangeSo)
782
# End pobyso_guess_degree_so_sa
783

  
769 784
def pobyso_infnorm_so_so(func, interval, file = None, intervalList = None):
770 785
    print "Do not use this function. User pobyso_supnorm_so_so instead."
771 786
    return(None)

Formats disponibles : Unified diff