Index: pobysoPythonSage/src/sageSLZ/runSLZ-53proj-binade.sage
===================================================================
--- pobysoPythonSage/src/sageSLZ/runSLZ-53proj-binade.sage	(revision 0)
+++ pobysoPythonSage/src/sageSLZ/runSLZ-53proj-binade.sage	(revision 252)
@@ -0,0 +1,123 @@
+#! /opt/sage/sage
+# @file runSLZ-113proj.sage
+#
+#@par Changes from runSLZ-113.sage
+# LLL reduction is not performed on the matrix itself but rather on the
+# product of the matrix with a uniform random matrix.
+# The reduced matrix obtained is discarded but the transformation matrix 
+# obtained is used to multiply the original matrix in order to reduced it.
+# If a sufficient level of reduction is obtained, we stop here. If not
+# the product matrix obtained above is LLL reduced. But as it has been
+# pre-reduced at the above step, reduction is supposed to be much faster.
+#
+# Both reductions combined should hopefully be faster than a straight single
+# reduction.
+#
+# Run SLZ for p=113
+#from scipy.constants.codata import precision
+def initialize_env():
+    """
+    Load all necessary modules.
+    """
+    compiledSpyxDir = "/home/storres/recherche/arithmetique/pobysoPythonSage/compiledSpyx"
+    if compiledSpyxDir not in sys.path:
+        sys.path.append(compiledSpyxDir)
+    if not 'mpfi' in sage.misc.cython.standard_libs:
+        sage.misc.cython.standard_libs.append('mpfi')
+    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sollya_lib.sage")
+#    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageMpfr.spyx")
+#    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageGMP.spyx")
+    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/pobyso.py")
+    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageSLZ.sage")
+    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageNumericalOperations.sage")
+    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageRationalOperations.sage")
+    # Matrix operations are loaded by polynomial operations.
+    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sagePolynomialOperations.sage")
+    load("/home/storres/recherche/arithmetique/pobysoPythonSage/src/sageSLZ/sageRunSLZ.sage")
+
+
+print "Running SLZ..."
+initialize_env()
+from sageMpfr import *
+from sageGMP  import *
+import sys
+from subprocess import call
+#
+## Main variables and parameters.
+x         = var('x')
+func(x)   = exp(x)
+precision = 53
+emin      = -1022
+emax      = 1023 
+RRR       = RealField(precision)
+degree    = 0
+alpha     = 0
+htrn      = 0
+binade    = 0
+debugMode = False          
+## Local functions
+#
+def usage():
+    write = sys.stderr.write
+    write("\nUsage:\n")
+    write("  " + scriptName + " <degree> <alpha> <htrn> <intervalCenter>\n")
+    write("               <numberOfNumbers> [debug]\n")
+    write("\nArguments:\n")
+    write("  degree          the degree of the polynomial (integer)\n")
+    write("  alpha           alpha (integer)\n")
+    write("  htrn            hardness-to-round - a number of bits (integer)\n")
+    write("  binade          the binade we want to  explore\n")
+    write("                  as a positive integral expression\n")
+    write("  debug           debug mode (\"debug\", in any case)\n\n")
+    sys.exit(2)
+# End usage.
+#
+argsCount = len(sys.argv)
+scriptName = os.path.basename(__file__)
+if argsCount < 5:
+    usage()
+for index in xrange(1,argsCount):
+    if index == 1:
+        degree = int(sys.argv[index])
+    elif index == 2:
+        alpha = int(sys.argv[index])
+    elif index == 3:
+        htrn = int(eval(sys.argv[index]))
+    elif index == 4:
+        binade = int(eval(sys.argv[index]))
+        ## The number must be strictly positive.
+    elif index == 5:
+        debugMode = sys.argv[index].upper()
+        debugMode = (debugMode == "DEBUG")
+# Done with command line arguments collection.
+#
+## Debug printing
+print "degree         :", degree
+print "alpha          :", alpha
+print "htrn           :", htrn
+print "binade         :", binade
+print "debug mode     :", debugMode
+print
+#
+## Set the terminal window title.
+terminalWindowTitle = ['stt', 
+                        str(degree), 
+                        str(alpha), 
+                        str(htrn), 
+                        str(binade)]
+call(terminalWindowTitle)
+#
+binadeUlp  = 2^(binade - precision + 1)
+lowerBound = RRR(2^binade)
+upperBound = RRR(2^(binade+1)) - binadeUlp
+srs_run_SLZ_v05_proj(inputFunction=func, 
+                     inputLowerBound         = lowerBound, 
+                     inputUpperBound         = upperBound, 
+                     alpha                   = alpha, 
+                     degree                  = degree, 
+                     precision               = precision, 
+                     emin                    = emin, 
+                     emax                    = emax, 
+                     targetHardnessToRound   = htrn, 
+                     debug                   = debugMode)
+    
\ No newline at end of file

Property changes on: pobysoPythonSage/src/sageSLZ/runSLZ-53proj-binade.sage
___________________________________________________________________
Added: svn:executable
   + *

