Statistiques
| Révision :

root / pobysoPythonSage / src / sageSLZ / runSLZ-05.sage @ 225

Historique | Voir | Annoter | Télécharger (2,81 ko)

1
#! /opt/sage/sage
2
# @file runSLZ-05.sage
3
#from scipy.constants.codata import precision
4
def initialize_env():
5
    """
6
    Load all necessary modules.
7
    """
8
    if not 'mpfi' in sage.misc.cython.standard_libs:
9
        sage.misc.cython.standard_libs.append('mpfi')
10
    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sollya_lib.sage")
11
    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageMpfr.spyx")
12
    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/pobyso.py")
13
    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageSLZ.sage")
14
    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageNumericalOperations.sage")
15
    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageRationalOperations.sage")
16
    # Matrix operations are loaded by polynomial operations.
17
    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sagePolynomialOperations.sage")
18
    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageRunSLZ.sage")
19

    
20

    
21
print "Running SLZ..."
22
initialize_env()
23
x = var('x')
24
func(x) = exp(x)
25
precision = 113
26
RRR = RealField(precision)
27
intervalCenter      = RRR(3/8)
28
icUlp               = intervalCenter.ulp()
29
intervalRadiusInUlp = 2^49 + 2^45
30
intervalRadius      = RRR(2^(-35))          
31
srs_run_SLZ_v05(inputFunction=func, 
32
                inputLowerBound         = intervalCenter - intervalRadius, 
33
                inputUpperBound         = intervalCenter + intervalRadius, 
34
                alpha                   = 6, 
35
                degree                  = 17, 
36
                precision               = precision, 
37
                emin                    = -16382, 
38
                emax                    = 16383, 
39
                targetHardnessToRound   = precision * 6, 
40
                debug                   = False)
41
#
42
"""
43
srs_run_SLZ_v01(inputFunction=func, 
44
                inputLowerBound = intervalCenter - icUlp * intervalRadiusInUlp, 
45
                inputUpperBound = intervalCenter + icUlp * intervalRadiusInUlp, 
46
                alpha           = 2, 
47
                degree          = 2, 
48
                precision       = 53, 
49
                emin            = -1022, 
50
                emax            = 1023, 
51
                targetHardnessToRound =  precision+50, 
52
                debug           = True)
53
"""
54
"""
55
srs_run_SLZ_v01(inputFunction=func, 
56
                inputLowerBound = 402653184/1073741824, 
57
                inputUpperBound = 402653185/1073741824, 
58
                alpha = 2, 
59
                degree = 10, 
60
                precision = 53, 
61
                emin = -1022, 
62
                emax = 1023, 
63
                targetHardnessToRound =  precision+50, 
64
                debug = True)
65

    
66
#inputUpperBound = RRR(1/2) - RRR(1/4).ulp(), 
67
RR("1.9E9CBBFD6080B",16)  * 2^-31]
68
"""