Statistiques
| Révision :

root / pobysoPythonSage / src / sageSLZ / runSLZ-06.sage @ 230

Historique | Voir | Annoter | Télécharger (2,09 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
    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 = 53
32
RRR = RealField(precision)
33
intervalCenter      = RRR(3/2)
34
icUlp               = intervalCenter.ulp()
35
intervalRadiusInUlp = 2^8
36
intervalRadius      = RRR(2^(-35))          
37
srs_run_SLZ_v06(inputFunction           = func, 
38
                inputLowerBound         = intervalCenter - intervalRadiusInUlp * icUlp, 
39
                inputUpperBound         = intervalCenter + intervalRadiusInUlp * icUlp, 
40
                alpha                   = 2, 
41
                degree                  = 2, 
42
                precision               = precision, 
43
                emin                    = -1022, 
44
                emax                    = 1023, 
45
                targetHardnessToRound   = precision + 10, 
46
                debug                   = True)
47
#