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