Statistiques
| Révision :

root / pobysoPythonSage / src / sageSLZ / runSLZ-05-06-02.sage @ 234

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

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

    
23

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

    
71
#inputUpperBound = RRR(1/2) - RRR(1/4).ulp(), 
72
RR("1.9E9CBBFD6080B",16)  * 2^-31]
73
"""