Index: pobysoPythonSage/src/pobyso.py
===================================================================
--- pobysoPythonSage/src/pobyso.py	(revision 226)
+++ pobysoPythonSage/src/pobyso.py	(revision 227)
@@ -799,11 +799,10 @@
     Get the current default precision in Sollya.
     The return value is Sage/Python int.
     """
-    precSo = sollya_lib_get_prec(None)
-    precSa = c_int(0)
-    sollya_lib_get_constant_as_int(byref(precSa), precSo)
+    precSo = sollya_lib_get_prec()
+    precSa = pobyso_constant_from_int_so_sa(precSo)
     sollya_lib_clear_obj(precSo)
-    return int(precSa.value)
+    return precSa
 # End pobyso_get_prec_so_sa.
 
 def pobyso_get_prec_so_so_sa():
@@ -812,10 +811,9 @@
     Sage integer as hybrid tuple.
     To avoid multiple calls for precision manipulations. 
     """
-    precSo = sollya_lib_get_prec(None)
-    precSa = c_int(0)
-    sollya_lib_get_constant_as_int(byref(precSa), precSo)
-    return (precSo, precSa.value)
+    precSo = sollya_lib_get_prec()
+    precSa = pobyso_constant_from_int_so_sa(precSo)
+    return (precSo, int(precSa))
     
 def pobyso_get_prec_of_constant(ctExpSo):
     """ Legacy function. See pobyso_get_prec_of_constant_so_sa. """
@@ -1669,9 +1667,10 @@
     pobyso_set_prec_sa_so(p)
 
 def pobyso_set_prec_sa_so(p):
-    a = c_int(p)
+    #a = c_int(p)
     #precSo = c_void_p(sollya_lib_constant_from_int(a))
-    precSo = sollya_lib_constant_from_int(a)
+    #precSo = sollya_lib_constant_from_int(a)
+    precSo = pobyso_constant_from_int_sa_so(p)
     sollya_lib_set_prec(precSo)
     sollya_lib_clear_obj(precSo)
 # End pobyso_set_prec_sa_so.
@@ -1728,7 +1727,7 @@
     x -> x-intervalCenter.
     """
     # Change internal Sollya precision, if needed.
-    (initialSollyaPrecSo, initialSollyaPrecSo) = pobyso_get_prec_so_so_sa()
+    (initialSollyaPrecSo, initialSollyaPrecSa) = pobyso_get_prec_so_so_sa()
     sollyaPrecChanged = False
     if sollyaPrecSo is None:
         pass
@@ -1774,10 +1773,10 @@
     pobyso_clear_taylorform_sa_so(taylorFormListSaSo)
     if absMaxErrorSa > absMinErrorSa:
         sollya_lib_clear_obj(absMinErrorSo)
-        return((polySo, intervalCenterSo, absMaxErrorSo))
+        return (polySo, intervalCenterSo, absMaxErrorSo)
     else:
         sollya_lib_clear_obj(absMaxErrorSo)
-        return((polySo, intervalCenterSo, absMinErrorSo))
+        return (polySo, intervalCenterSo, absMinErrorSo)
 # end pobyso_taylor_expansion_no_change_var_so_so
 
 def pobyso_taylor_expansion_with_change_var_so_so(functionSo, degreeSo, \
Index: pobysoPythonSage/src/sageSLZ/runSLZ-06.sage.py
===================================================================
--- pobysoPythonSage/src/sageSLZ/runSLZ-06.sage.py	(revision 226)
+++ pobysoPythonSage/src/sageSLZ/runSLZ-06.sage.py	(revision 227)
@@ -1,16 +1,19 @@
 # This file was *autogenerated* from the file ./runSLZ-06.sage
 from sage.all_cmdline import *   # import sage library
-_sage_const_3 = Integer(3); _sage_const_2 = Integer(2); _sage_const_45 = Integer(45); _sage_const_113 = Integer(113); _sage_const_49 = Integer(49); _sage_const_8 = Integer(8); _sage_const_16383 = Integer(16383); _sage_const_16382 = Integer(16382); _sage_const_18 = Integer(18); _sage_const_35 = Integer(35); _sage_const_6 = Integer(6)#! /opt/sage/sage
+_sage_const_3 = Integer(3); _sage_const_2 = Integer(2); _sage_const_35 = Integer(35); _sage_const_8 = Integer(8); _sage_const_1023 = Integer(1023); _sage_const_1022 = Integer(1022); _sage_const_10 = Integer(10); _sage_const_53 = Integer(53)#! /opt/sage/sage
 # @file runSLZ-05.sage
 #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/sageMpfr.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")
@@ -22,22 +25,25 @@
 
 print "Running SLZ..."
 initialize_env()
+from sageMpfr import *
+from sageGMP  import *
+#
 x = var('x')
 __tmp__=var("x"); func = symbolic_expression(exp(x)).function(x)
-precision = _sage_const_113 
+precision = _sage_const_53 
 RRR = RealField(precision)
-intervalCenter      = RRR(_sage_const_3 /_sage_const_8 )
+intervalCenter      = RRR(_sage_const_3 /_sage_const_2 )
 icUlp               = intervalCenter.ulp()
-intervalRadiusInUlp = _sage_const_2 **_sage_const_49  + _sage_const_2 **_sage_const_45 
+intervalRadiusInUlp = _sage_const_2 **_sage_const_8 
 intervalRadius      = RRR(_sage_const_2 **(-_sage_const_35 ))          
-srs_run_SLZ_v05(inputFunction=func, 
-                inputLowerBound         = intervalCenter - intervalRadius, 
-                inputUpperBound         = intervalCenter + intervalRadius, 
-                alpha                   = _sage_const_6 , 
-                degree                  = _sage_const_18 , 
+srs_run_SLZ_v06(inputFunction           = func, 
+                inputLowerBound         = intervalCenter - intervalRadiusInUlp * icUlp, 
+                inputUpperBound         = intervalCenter + intervalRadiusInUlp * icUlp, 
+                alpha                   = _sage_const_2 , 
+                degree                  = _sage_const_2 , 
                 precision               = precision, 
-                emin                    = -_sage_const_16382 , 
-                emax                    = _sage_const_16383 , 
-                targetHardnessToRound   = precision * _sage_const_6 , 
+                emin                    = -_sage_const_1022 , 
+                emax                    = _sage_const_1023 , 
+                targetHardnessToRound   = precision + _sage_const_10 , 
                 debug                   = True)
 #
Index: pobysoPythonSage/src/sageSLZ/sageSLZ.sage
===================================================================
--- pobysoPythonSage/src/sageSLZ/sageSLZ.sage	(revision 226)
+++ pobysoPythonSage/src/sageSLZ/sageSLZ.sage	(revision 227)
@@ -849,7 +849,7 @@
 
 def slz_compute_polynomial_and_interval_02(functionSo, degreeSo, lowerBoundSa, 
                                         upperBoundSa, approxAccurSa, 
-                                        sollyaPrecSa=None):
+                                        sollyaPrecSa=None, debug=True ):
     """
     Under the assumptions listed for slz_get_intervals_and_polynomials, compute
     a polynomial that approximates the function on a an interval starting
@@ -866,7 +866,8 @@
     - the center of the interval;
     - the maximum error in the approximation of the input functionSo by the
       output polynomial ; this error <= approxAccurSaS.
-    
+    Changes fom v1:
+        extra verbose.
     """
     print"In slz_compute_polynomial_and_interval..."
     ## Superficial argument check.
@@ -875,7 +876,8 @@
     ## Change Sollya precision, if requested.
     sollyaPrecChanged = False
     (initialSollyaPrecSo, initialSollyaPrecSa) = pobyso_get_prec_so_so_sa()
-    if not sollyaPrecSa is None:
+    #print "Initial Sollya prec:", initialSollyaPrecSa, type(initialSollyaPrecSa)
+    if sollyaPrecSa is None:
         sollyaPrecSa = initialSollyaPrecSa
     else:
         if sollyaPrecSa <= 2:
@@ -888,14 +890,19 @@
     currentRangeSo = pobyso_bounds_to_range_sa_so(lowerBoundSa, upperBoundSa)
     currentUpperBoundSa = upperBoundSa
     currentLowerBoundSa = lowerBoundSa
-    # What we want here is the polynomial without the variable change, 
-    # since our actual variable will be x-intervalCenter defined over the 
-    # domain [lowerBound-intervalCenter , upperBound-intervalCenter]. 
+    #pobyso_autoprint(functionSo)
+    #pobyso_autoprint(degreeSo)
+    #pobyso_autoprint(currentRangeSo)
+    #pobyso_autoprint(absoluteErrorTypeSo)
+    ## What we want here is the polynomial without the variable change, 
+    #  since our actual variable will be x-intervalCenter defined over the 
+    #  domain [lowerBound-intervalCenter , upperBound-intervalCenter].
     (polySo, intervalCenterSo, maxErrorSo) = \
         pobyso_taylor_expansion_no_change_var_so_so(functionSo, degreeSo, 
                                                     currentRangeSo, 
                                                     absoluteErrorTypeSo)
     maxErrorSa = pobyso_get_constant_as_rn_with_rf_so_sa(maxErrorSo)
+    print "...after Taylor expansion."
     while maxErrorSa > approxAccurSa:
         print "++Approximation error:", maxErrorSa.n()
         sollya_lib_clear_obj(polySo)
Index: pobysoPythonSage/src/sageSLZ/runSLZ-06.sage
===================================================================
--- pobysoPythonSage/src/sageSLZ/runSLZ-06.sage	(revision 226)
+++ pobysoPythonSage/src/sageSLZ/runSLZ-06.sage	(revision 227)
@@ -5,10 +5,13 @@
     """
     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/sageMpfr.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")
@@ -20,22 +23,25 @@
 
 print "Running SLZ..."
 initialize_env()
+from sageMpfr import *
+from sageGMP  import *
+#
 x = var('x')
 func(x) = exp(x)
-precision = 113
+precision = 53
 RRR = RealField(precision)
-intervalCenter      = RRR(3/8)
+intervalCenter      = RRR(3/2)
 icUlp               = intervalCenter.ulp()
-intervalRadiusInUlp = 2^49 + 2^45
+intervalRadiusInUlp = 2^8
 intervalRadius      = RRR(2^(-35))          
-srs_run_SLZ_v05(inputFunction=func, 
-                inputLowerBound         = intervalCenter - intervalRadius, 
-                inputUpperBound         = intervalCenter + intervalRadius, 
-                alpha                   = 6, 
-                degree                  = 18, 
+srs_run_SLZ_v06(inputFunction           = func, 
+                inputLowerBound         = intervalCenter - intervalRadiusInUlp * icUlp, 
+                inputUpperBound         = intervalCenter + intervalRadiusInUlp * icUlp, 
+                alpha                   = 2, 
+                degree                  = 2, 
                 precision               = precision, 
-                emin                    = -16382, 
-                emax                    = 16383, 
-                targetHardnessToRound   = precision * 6, 
+                emin                    = -1022, 
+                emax                    = 1023, 
+                targetHardnessToRound   = precision + 10, 
                 debug                   = True)
 #
Index: pobysoPythonSage/src/sageSLZ/sageRunSLZ.sage
===================================================================
--- pobysoPythonSage/src/sageSLZ/sageRunSLZ.sage	(revision 226)
+++ pobysoPythonSage/src/sageSLZ/sageRunSLZ.sage	(revision 227)
@@ -2966,7 +2966,6 @@
         2- once a non null resultant is found, check for roots;
         3- constant resultant == no root.
     """
-
     if debug:
         print "Function                :", inputFunction
         print "Lower bound             :", inputLowerBound
@@ -3046,6 +3045,7 @@
     internalSollyaPrec = ceil((RR('1.5') * targetHardnessToRound) / 64) * 64
     if internalSollyaPrec < 192:
         internalSollyaPrec = 192
+    pobyso_lib_init()
     pobyso_set_prec_sa_so(internalSollyaPrec)
     print "Sollya internal precision:", internalSollyaPrec
     targetPlusOnePrecRF       = RealField(RRR.prec()+1)
@@ -3108,18 +3108,19 @@
         iterCount += 1
         print "[", lb, ",", ub, "]", ((ub - lb) / intervalUlp).log2().n(), \
             "log2(numbers)." 
+        #print "Debugging..."
         ### Compute a Sollya polynomial that will honor the Taylor condition.
-        prceSo = slz_compute_polynomial_and_interval_01(scaledfSo,
+        prceSo = slz_compute_polynomial_and_interval_02(scaledfSo,
                                                         degreeSo,
                                                         lb,
                                                         ub,
                                                         polyApproxAccur,
                                                         debug=True)
         if debug:
-            print "Sollya Taylor polynomial:", pobyso_autoprint(prceSo[0])
-            print "Sollya interval         :", pobyso_autoprint(prceSo[1])
-            print "Sollya interval center  :", pobyso_autoprint(prceSo[2])
-            print "Sollya Taylor error     :", pobyso_autoprint(prceSo[3])
+            print "Sollya Taylor polynomial:", ; pobyso_autoprint(prceSo[0])
+            print "Sollya interval         :", ; pobyso_autoprint(prceSo[1])
+            print "Sollya interval center  :", ; pobyso_autoprint(prceSo[2])
+            print "Sollya Taylor error     :", ; pobyso_autoprint(prceSo[3])
 
         ### Convert back the data into Sage space.                         
         (floatP, floatPcv, intvl, ic, terr) = \
