Révision 181 pobysoPythonSage/src/testPobyso.sage

testPobyso.sage (revision 181)
277 277
    return timing
278 278
# End test_pobyso_taylor_expansion_no_change_var_so_so
279 279

  
280
def test_pobyso_taylor_expansion_with_change_var_so_so(repeat=1000, number=10):
281
    functionName = inspect.stack()[0][3]
282
    print "Running", functionName, "..."
283
    functionSo  = pobyso_parse_string('exp(x)')
284
    degreeSo    = pobyso_constant_from_int_sa_so(20)
285
    rangeSo     = pobyso_bounds_to_range_sa_so(RR(1),RR(2))
286
    errorTypeSo = pobyso_absolute_so_so()
287
    def test(functionSo, degreeSo, rangeSo, errorTypeSo):
288
        teSo = pobyso_taylor_expansion_with_change_var_so_so(functionSo,
289
                                                             degreeSo,
290
                                                             rangeSo,
291
                                                             errorTypeSo)
292
        sollya_lib_clear_obj(teSo[0])
293
        sollya_lib_clear_obj(teSo[1])
294
        sollya_lib_clear_obj(teSo[2])
295
    # End test
296
    wrapped = test_pobyso_wrapper(test, 
297
                                  functionSo, 
298
                                  degreeSo, 
299
                                  rangeSo, 
300
                                  errorTypeSo)
301
    timing = min(timeit.repeat(wrapped, repeat=repeat, number=number))
302
    sollya_lib_clear_obj(functionSo)
303
    sollya_lib_clear_obj(degreeSo)
304
    sollya_lib_clear_obj(rangeSo)
305
    sollya_lib_clear_obj(errorTypeSo)
306
    print "\t...", functionName, "done."
307
    return timing
308
# End test_pobyso_taylor_expansion_with_change_var_so_so
309

  
280 310
def test_pobyso_taylorform_so_so_2(repeat=1000, number=10):
281 311
    functionName = inspect.stack()[0][3]
282 312
    print "Running", functionName, "..."

Formats disponibles : Unified diff