Index: pobysoPythonSage/src/pobyso.py
===================================================================
--- pobysoPythonSage/src/pobyso.py	(revision 279)
+++ pobysoPythonSage/src/pobyso.py	(revision 280)
@@ -142,8 +142,9 @@
     are cleared when the list is cleared).
     """
     if len(args) == 0:
-        ## Called with an empty list produced "error".
-        return sollya_lib_build_end_elliptic_list(None)
+        ## When called with an empty list, sollya_lib_build_end_elliptic_list,
+        #  produces "error".
+        return sollya_lib_build_list(None)
     index = 0
     ## One can not append elements to an elliptic list, prepend only is 
     #  permitted.
@@ -207,6 +208,29 @@
     return(resultSo)
 # End pobyso_chebyshevform_so_so.
 
+def pobyso_clear_full_list_elements_sa_so(objectListSaSo):
+    """
+    Clear the elements of list created by the 
+    pobyso_get_list_elements_so_so function.
+    objectListSaSo is as follows:
+    - objectListSaSo[0]: a list of Sollya objects;
+    - objectListSaSo[1]: the number of elements of the previous list;
+    - objectListSaSo[2]: an integer that if != 0 states that the list is 
+                         end-elliptic
+    The objects to clear are the elements of the objectListSaSo[0] list. 
+    """
+    for index in xrange(0, objectListSaSo[1]):
+        sollya_lib_clear_obj(objectListSaSo[0][index])
+# End pobyso_clear_full_list_elements_sa_so
+
+def pobyso_clear_list_elements_sa_so(objectListSaSo):
+    """
+    Clear the elements of list of references to Sollya objects
+    """
+    for index in xrange(0, len(objectListSaSo)):
+        sollya_lib_clear_obj(objectListSaSo[index])
+# End pobyso_clear_list_elements_sa_so
+
 def pobyso_clear_obj(objSo):
     """
     Free a Sollya object's memory.
@@ -217,20 +241,19 @@
 
 def pobyso_clear_taylorform_sa_so(taylorFormSaSo):
     """
-    This method is necessary to correctly clean up the memory from Taylor forms.
-    These are made of a Sollya object, a Sollya object list, a Sollya object.
-    For no clearly understood reason, sollya_lib_clear_object_list crashed 
-    when applied to the object list.
-    Here, we decompose it into Sage list of Sollya objects references and we
-     clear them one at a time. 
+    This method is rapper around pobyso_clear_list_elements_sa_so.
+    It is a legacy method left here since it may be used in existing code 
+    where Taylor forms are used as Sage lists obtained by converting
+    Sollya Taylor forms (a list made of:
+    - a polynomial;
+    - a list of intervals enclosing the errors accumulated when computing
+      the polynomial coefficients;
+    - a bound on the approximation error between the polynomial and the 
+      function.)
+    A Taylor form directly obtained from pobyso_taylorform_so_so is cleared
+    by sollya_lib_clear_obj. 
     """
-    sollya_lib_clear_obj(taylorFormSaSo[0])
-    (coefficientsErrorsListSaSo, numElementsSa, isEndEllipticSa) = \
-        pobyso_get_list_elements_so_so(taylorFormSaSo[1])
-    for element in coefficientsErrorsListSaSo:
-        sollya_lib_clear_obj(element)
-    sollya_lib_clear_obj(taylorFormSaSo[1])
-    sollya_lib_clear_obj(taylorFormSaSo[2])
+    pobyso_clear_list_elements_sa_so(taylorFormSaSo)
 # End pobyso_clear_taylorform_sa_so 
 
 def pobyso_cmp(rnArgSa, cteSo):
@@ -2074,7 +2097,7 @@
     maxErrorSo    = sollya_lib_sup(taylorFormListSaSo[2])
     minErrorSo    = sollya_lib_inf(taylorFormListSaSo[2])
     # List taylorFormListSaSo is not needed anymore.
-    pobyso_clear_taylorform_sa_so(taylorFormListSaSo)
+    pobyso_clear_list_elements_sa_so(taylorFormListSaSo)
     absMaxErrorSo = sollya_lib_abs(maxErrorSo)
     absMinErrorSo = sollya_lib_abs(minErrorSo)
     sollya_lib_clear_obj(maxErrorSo)
@@ -2146,7 +2169,7 @@
                        sollya_lib_copy_obj(intervalCenterSo))
     polyVarChangedSo = sollya_lib_evaluate(polySo, changeVarExpSo)
     # List taylorFormListSaSo is not needed anymore.
-    pobyso_clear_taylorform_sa_so(taylorFormListSaSo)
+    pobyso_clear_list_elements_sa_so(taylorFormListSaSo)
     sollya_lib_clear_obj(changeVarExpSo)
     # If changed, reset the Sollya working precision.
     if sollyaPrecChanged:
Index: pobysoPythonSage/src/sollya_lib.sage
===================================================================
--- pobysoPythonSage/src/sollya_lib.sage	(revision 279)
+++ pobysoPythonSage/src/sollya_lib.sage	(revision 280)
@@ -4,7 +4,6 @@
 #
 ## Load the Sollya library.
 try:
-    #sollya=CDLL("/usr/local/lib/libsollya.so")
     sollya=CDLL("/usr/local/lib/libsollya.so")    
 except :
     print "\nCould not find nor load the Sollya library.\n"
Index: pobysoPythonSage/src/sageSLZ/argsForRunSLZ-113best.sh
===================================================================
--- pobysoPythonSage/src/sageSLZ/argsForRunSLZ-113best.sh	(revision 0)
+++ pobysoPythonSage/src/sageSLZ/argsForRunSLZ-113best.sh	(revision 280)
@@ -0,0 +1,13 @@
+#! /bin/bash
+#@file argsForRunSLZ-113proj.sh
+DEGREE=45
+ALPHA=10
+HARDNESS_TO_ROUND="113*10"
+INTERVAL_CENTER="3/8"
+NUM_OF_NUMBERS="2^92"
+#
+printf -- "$DEGREE \
+$ALPHA \
+$HARDNESS_TO_ROUND \
+$INTERVAL_CENTER \
+$NUM_OF_NUMBERS\n"

Property changes on: pobysoPythonSage/src/sageSLZ/argsForRunSLZ-113best.sh
___________________________________________________________________
Added: svn:executable
   + *

Index: pobysoPythonSage/src/sageSLZ/runSLZ-113proj-02.sage.py
===================================================================
--- pobysoPythonSage/src/sageSLZ/runSLZ-113proj-02.sage.py	(revision 0)
+++ pobysoPythonSage/src/sageSLZ/runSLZ-113proj-02.sage.py	(revision 280)
@@ -0,0 +1,149 @@
+# This file was *autogenerated* from the file ./runSLZ-113proj-02.sage
+from sage.all_cmdline import *   # import sage library
+_sage_const_3 = Integer(3); _sage_const_2 = Integer(2); _sage_const_1 = Integer(1); _sage_const_0 = Integer(0); _sage_const_6 = Integer(6); _sage_const_5 = Integer(5); _sage_const_4 = Integer(4); _sage_const_113 = Integer(113); _sage_const_10 = Integer(10); _sage_const_16383 = Integer(16383); _sage_const_16382 = Integer(16382)#! /opt/sage/sage
+# @file runSLZ-113proj-92.sage
+#
+#@par Changes from runSLZ-113proj.sage
+# The uniform random matrix element can be integers in the
+# [-2^(n-1),2^(n-1)-1] range. The value of "n" is set in function 
+# slz_reduce_lll_proj_02.  
+#
+#@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.
+    """
+    if version().split()[_sage_const_2 ].replace(',','') > '6.6':
+        compiledSpyxDir = \
+            "/home/storres/recherche/arithmetique/pobysoPythonSage/compiledSpyx"
+        if compiledSpyxDir not in sys.path:
+            sys.path.append(compiledSpyxDir)
+    else:
+        if not 'mpfi' in sage.misc.cython.standard_libs:
+            sage.misc.cython.standard_libs.append('mpfi')
+        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/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()
+if version().split()[_sage_const_2 ].replace(',','') > '6.6':
+    from sageMpfr import *
+    from sageGMP  import *
+import sys
+from subprocess import call
+#
+## Main variables and parameters.
+x         = var('x')
+__tmp__=var("x"); func = symbolic_expression(exp(x)).function(x)
+precision = _sage_const_113 
+emin      = -_sage_const_16382 
+emax      = _sage_const_16383  
+RRR = RealField(precision)
+degree              = _sage_const_0 
+alpha               = _sage_const_0 
+htrn                = _sage_const_0 
+intervalCenter      = _sage_const_0 
+intervalRadius      = _sage_const_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("  intervalCenter  the interval center (a floating-point number)\n")
+    write("  numberOfNumbers the number of floating-point numbers in the interval\n")
+    write("                  as a positive integral expression\n")
+    write("  debug           debug mode (\"debug\", in any case)\n\n")
+    sys.exit(_sage_const_2 )
+# End usage.
+#
+argsCount = len(sys.argv)
+scriptName = os.path.basename(__file__)
+if argsCount < _sage_const_5 :
+    usage()
+for index in xrange(_sage_const_1 ,argsCount):
+    if index == _sage_const_1 :
+        degree = int(sys.argv[index])
+    elif index == _sage_const_2 :
+        alpha = int(sys.argv[index])
+    elif index == _sage_const_3 :
+        htrn = int(eval(sys.argv[index]))
+    elif index == _sage_const_4 :
+        try:
+            intervalCenter = QQ(sage_eval(sys.argv[index]))
+        except:
+            intervalCenter = RRR(sys.argv[index])
+        intervalCenter = RRR(intervalCenter)
+    elif index == _sage_const_5 :
+        ## Can be read as rational number but must end up as an integer.
+        numberOfNumbers = QQ(sage_eval(sys.argv[index]))
+        if numberOfNumbers != numberOfNumbers.round():
+            raise Exception("Invalid number of numbers: " + sys.argv[index] + ".")
+        numberOfNumbers = numberOfNumbers.round()
+        ## The number must be strictly positive.
+        if numberOfNumbers <= _sage_const_0 :
+            raise Exception("Invalid number of numbers: " + sys.argv[index] + ".")
+    elif index == _sage_const_6 :
+        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 "interval center:", intervalCenter.n(prec=_sage_const_10 ).str(truncate=False)
+print "num of nums    :", RR(numberOfNumbers).log2().n(prec=_sage_const_10 ).str(truncate=False)
+print "debug mode     :", debugMode
+print
+#
+## Set the terminal window title.
+terminalWindowTitle = ['stt', str(degree), str(alpha), str(htrn), 
+                       intervalCenter.n(prec=_sage_const_10 ).str(truncate=False), 
+                       RRR(numberOfNumbers).log2().n(prec=_sage_const_10 ).str(truncate=False)]
+call(terminalWindowTitle)
+#
+intervalCenterBinade = slz_compute_binade(intervalCenter)
+intervalRadius       = \
+    _sage_const_2 **intervalCenterBinade * _sage_const_2 **(-precision + _sage_const_1 ) * numberOfNumbers / _sage_const_2 
+srs_run_SLZ_v05_proj_02(inputFunction=func, 
+                        inputLowerBound         = intervalCenter - intervalRadius, 
+                        inputUpperBound         = intervalCenter + intervalRadius, 
+                        alpha                   = alpha, 
+                        degree                  = degree, 
+                        precision               = precision, 
+                        emin                    = emin, 
+                        emax                    = emax, 
+                        targetHardnessToRound   = htrn, 
+                        debug                   = debugMode)
+    

Property changes on: pobysoPythonSage/src/sageSLZ/runSLZ-113proj-02.sage.py
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: pobysoPythonSage/src/sageSLZ/runSLZ-113projWeak.sage.py
===================================================================
--- pobysoPythonSage/src/sageSLZ/runSLZ-113projWeak.sage.py	(revision 0)
+++ pobysoPythonSage/src/sageSLZ/runSLZ-113projWeak.sage.py	(revision 280)
@@ -0,0 +1,144 @@
+# This file was *autogenerated* from the file ./runSLZ-113projWeak.sage
+from sage.all_cmdline import *   # import sage library
+_sage_const_3 = Integer(3); _sage_const_2 = Integer(2); _sage_const_1 = Integer(1); _sage_const_0 = Integer(0); _sage_const_6 = Integer(6); _sage_const_5 = Integer(5); _sage_const_4 = Integer(4); _sage_const_113 = Integer(113); _sage_const_10 = Integer(10); _sage_const_16383 = Integer(16383); _sage_const_16382 = Integer(16382)#! /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.
+    """
+    if version().split()[_sage_const_2 ].replace(',','') > '6.6':
+        compiledSpyxDir = \
+            "/home/storres/recherche/arithmetique/pobysoPythonSage/compiledSpyx"
+        if compiledSpyxDir not in sys.path:
+            sys.path.append(compiledSpyxDir)
+    else:
+        if not 'mpfi' in sage.misc.cython.standard_libs:
+            sage.misc.cython.standard_libs.append('mpfi')
+        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/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()
+if version().split()[_sage_const_2 ].replace(',','') > '6.6':
+    from sageMpfr import *
+    from sageGMP  import *
+import sys
+from subprocess import call
+#
+## Main variables and parameters.
+x         = var('x')
+__tmp__=var("x"); func = symbolic_expression(exp(x)).function(x)
+precision = _sage_const_113 
+emin      = -_sage_const_16382 
+emax      = _sage_const_16383  
+RRR = RealField(precision)
+degree              = _sage_const_0 
+alpha               = _sage_const_0 
+htrn                = _sage_const_0 
+intervalCenter      = _sage_const_0 
+intervalRadius      = _sage_const_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("  intervalCenter  the interval center (a floating-point number)\n")
+    write("  numberOfNumbers the number of floating-point numbers in the interval\n")
+    write("                  as a positive integral expression\n")
+    write("  debug           debug mode (\"debug\", in any case)\n\n")
+    sys.exit(_sage_const_2 )
+# End usage.
+#
+argsCount = len(sys.argv)
+scriptName = os.path.basename(__file__)
+if argsCount < _sage_const_5 :
+    usage()
+for index in xrange(_sage_const_1 ,argsCount):
+    if index == _sage_const_1 :
+        degree = int(sys.argv[index])
+    elif index == _sage_const_2 :
+        alpha = int(sys.argv[index])
+    elif index == _sage_const_3 :
+        htrn = int(eval(sys.argv[index]))
+    elif index == _sage_const_4 :
+        try:
+            intervalCenter = QQ(sage_eval(sys.argv[index]))
+        except:
+            intervalCenter = RRR(sys.argv[index])
+        intervalCenter = RRR(intervalCenter)
+    elif index == _sage_const_5 :
+        ## Can be read as rational number but must end up as an integer.
+        numberOfNumbers = QQ(sage_eval(sys.argv[index]))
+        if numberOfNumbers != numberOfNumbers.round():
+            raise Exception("Invalid number of numbers: " + sys.argv[index] + ".")
+        numberOfNumbers = numberOfNumbers.round()
+        ## The number must be strictly positive.
+        if numberOfNumbers <= _sage_const_0 :
+            raise Exception("Invalid number of numbers: " + sys.argv[index] + ".")
+    elif index == _sage_const_6 :
+        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 "interval center:", intervalCenter.n(prec=_sage_const_10 ).str(truncate=False)
+print "num of nums    :", RR(numberOfNumbers).log2().n(prec=_sage_const_10 ).str(truncate=False)
+print "debug mode     :", debugMode
+print
+#
+## Set the terminal window title.
+terminalWindowTitle = ['stt', str(degree), str(alpha), str(htrn), 
+                       intervalCenter.n(prec=_sage_const_10 ).str(truncate=False), 
+                       RRR(numberOfNumbers).log2().n(prec=_sage_const_10 ).str(truncate=False)]
+call(terminalWindowTitle)
+#
+intervalCenterBinade = slz_compute_binade(intervalCenter)
+intervalRadius       = \
+    _sage_const_2 **intervalCenterBinade * _sage_const_2 **(-precision + _sage_const_1 ) * numberOfNumbers / _sage_const_2 
+srs_run_SLZ_v05_proj_weak(inputFunction=func, 
+                     inputLowerBound         = intervalCenter - intervalRadius, 
+                     inputUpperBound         = intervalCenter + intervalRadius, 
+                     alpha                   = alpha, 
+                     degree                  = degree, 
+                     precision               = precision, 
+                     emin                    = emin, 
+                     emax                    = emax, 
+                     targetHardnessToRound   = htrn, 
+                     debug                   = debugMode)
+    

Property changes on: pobysoPythonSage/src/sageSLZ/runSLZ-113projWeak.sage.py
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: pobysoPythonSage/src/testPobyso.sage
===================================================================
--- pobysoPythonSage/src/testPobyso.sage	(revision 279)
+++ pobysoPythonSage/src/testPobyso.sage	(revision 280)
@@ -73,7 +73,7 @@
     return timing
 # End test_pobyso_bounds_to_range_sa_so
 
-def test_pobyso_clear_taylorform_sa_so(repeat=1000, number=10):
+def test_pobyso_clear_full_list_elements_sa_so(repeat=1000, number=10):
     functionName =  inspect.stack()[0][3]
     print "Running", inspect.stack()[0][3], "..."
     intervalSa = RIF(1,2)
@@ -84,11 +84,16 @@
     intervalSo = pobyso_interval_to_range_sa_so(intervalSa)
     #
     def test(functionSo, degreeSo, pointSo, intervalSo):
+        """
+        We use Taylor models to generate the lists.
+        """
         taylorformSo = pobyso_taylorform_so_so(functionSo,
                                                degreeSo,
                                                pointSo,
                                                intervalSo)
-        pobyso_clear_taylorform_sa_so(taylorformSo)
+        taylorformSaSo = pobyso_get_list_elements_so_so(taylorformSo)
+        pobyso_clear_full_list_elements_sa_so(taylorformSaSo)
+        sollya_lib_clear_obj(taylorformSo)
     #
     wrapped = test_pobyso_wrapper(test,
                                   functionSo, 
@@ -103,7 +108,7 @@
     sollya_lib_clear_obj(intervalSo)
     print "\t...", functionName, "done."
     return timing
-# End test_pobyso_bounds_to_range_sa_so
+# End test_pobyso_clear_full_list_elements_sa_so
 
 def test_pobyso_float_poly_sa_so(repeat=100, number=10):
     functionName = inspect.stack()[0][3]
