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