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