root / pobysoPythonSage / src / sageSLZ / runSLZ-01.sage @ 196
Historique | Voir | Annoter | Télécharger (2,24 ko)
1 | 184 | storres | #! /opt/sage/sage |
---|---|---|---|
2 | 193 | storres | #from scipy.constants.codata import precision |
3 | 184 | storres | def initialize_env(): |
4 | 193 | storres | """ |
5 | 193 | storres | Load all necessary modules. |
6 | 193 | storres | """ |
7 | 184 | storres | if not 'mpfi' in sage.misc.cython.standard_libs: |
8 | 184 | storres | sage.misc.cython.standard_libs.append('mpfi') |
9 | 184 | storres | load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sollya_lib.sage") |
10 | 189 | storres | load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageMpfr.spyx") |
11 | 184 | storres | load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/pobyso.py") |
12 | 184 | storres | load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageSLZ.sage") |
13 | 184 | storres | load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageNumericalOperations.sage") |
14 | 184 | storres | load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageRationalOperations.sage") |
15 | 184 | storres | # Matrix operations are loaded by polynomial operations. |
16 | 184 | storres | load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sagePolynomialOperations.sage") |
17 | 196 | storres | load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageRunSLZ.sage") |
18 | 184 | storres | |
19 | 184 | storres | |
20 | 184 | storres | print "Running SLZ..." |
21 | 189 | storres | initialize_env() |
22 | 189 | storres | x = var('x') |
23 | 189 | storres | func(x) = exp(x) |
24 | 189 | storres | precision = 53 |
25 | 189 | storres | RRR = RealField(precision) |
26 | 196 | storres | intervalCenter = RRR("1.9E9CBBFD6080B",16) * 2^-31 |
27 | 196 | storres | icUlp = intervalCenter.ulp() |
28 | 196 | storres | intervalRadiusInUlp = 2^49 + 2^45 |
29 | 196 | storres | srs_run_SLZ_v01(inputFunction=func, |
30 | 196 | storres | inputLowerBound = intervalCenter - icUlp * intervalRadiusInUlp, |
31 | 196 | storres | inputUpperBound = intervalCenter + icUlp * intervalRadiusInUlp, |
32 | 196 | storres | alpha = 2, |
33 | 196 | storres | degree = 2, |
34 | 196 | storres | precision = 53, |
35 | 196 | storres | emin = -1022, |
36 | 196 | storres | emax = 1023, |
37 | 196 | storres | targetHardnessToRound = precision+50, |
38 | 196 | storres | debug = True) |
39 | 196 | storres | # |
40 | 196 | storres | """ |
41 | 196 | storres | srs_run_SLZ_v01(inputFunction=func, |
42 | 196 | storres | inputLowerBound = 402653184/1073741824, |
43 | 196 | storres | inputUpperBound = 402653185/1073741824, |
44 | 196 | storres | alpha = 2, |
45 | 196 | storres | degree = 10, |
46 | 196 | storres | precision = 53, |
47 | 196 | storres | emin = -1022, |
48 | 196 | storres | emax = 1023, |
49 | 196 | storres | targetHardnessToRound = precision+50, |
50 | 196 | storres | debug = True) |
51 | 192 | storres | |
52 | 192 | storres | #inputUpperBound = RRR(1/2) - RRR(1/4).ulp(), |
53 | 196 | storres | RR("1.9E9CBBFD6080B",16) * 2^-31] |
54 | 196 | storres | """ |