Index: pobysoPythonSage/src/sageSLZ.sage
===================================================================
--- pobysoPythonSage/src/sageSLZ.sage	(revision 63)
+++ pobysoPythonSage/src/sageSLZ.sage	(revision 64)
@@ -59,7 +59,7 @@
 def slz_get_intervals_and_polynomials(functionSa, variableNameSa, degreeSa, 
                                       lowerBoundSa, 
                                       upperBoundSa, floatingPointPrecSa, 
-                                      internalSollyaPrecSa):
+                                      internalSollyaPrecSa, approxPrecSa):
     """
     Under the assumption that:
     - functionSa is monotonic on the [lowerBoundSa, upperBoundSa] interval;
@@ -70,12 +70,13 @@
     - a pair of bounds;
     - the floating-point precision we work on;
     - the internal Sollya precision;
+    - the requested approximation error
     compute a list of tuples made of:
     - a polynomial approximating the function (a Sollya object);
     - the range for which the polynomial approximates the function 
       (a Sollya object);
     - the center of the interval (a Sollya object);
-    - the approximation error (a Sage object). 
+    - the actual approximation error (a Sage object). 
     The initial interval is, possibly, splitted into smaller intervals.
     It return a list of tuples, each made of:
     - a polynomial;
@@ -91,7 +92,8 @@
         slz_interval_scaling_expression(domainBoundsIntervalSa, variableNameSa)
     print "domainScalingExpression for argument :", domainScalingExpressionSa
     print "f: ", f
-    ff = f.subs({x:domainScalingExpressionSa})
+    ff = f.subs({x : domainScalingExpressionSa})
+    #ff = f.subs_expr(x==domainScalingExpressionSa)
     scaledLowerBoundSa = invDomainScalingExpressionSa(lowerBoundSa).n()
     scaledUpperBoundSa = invDomainScalingExpressionSa(upperBoundSa).n()
     print 'ff:', ff, "- Domain:", scaledLowerBoundSa, scaledUpperBoundSa
@@ -114,7 +116,6 @@
     #
     resultArray = []
     #
-    approxPrecSa = 1/(2^(floatingPointPrecSa + 1))
     print "Approximation precision: ", RR(approxPrecSa)
     # Prepare the arguments for the Taylor expansion computation with Sollya.
     functionSo = pobyso_parse_string_sa_so(fff._assume_str())
@@ -126,13 +127,13 @@
         slz_compute_polynomial_and_interval(functionSo, degreeSo,
                                         scaledLowerBoundSa, scaledUpperBoundSa,
                                         approxPrecSa, internalSollyaPrecSa)
-    """
+    # Change variable stuff
     changeVarExpressionSo = sollya_lib_build_function_sub(
                               sollya_lib_build_function_free_variable(), 
                               sollya_lib_copy_obj(intervalCenterSo))
     polyVarChangedSo = sollya_lib_evaluate(polySo, changeVarExpressionSo) 
-    """
-    resultArray.append((polySo, boundsSo, intervalCenterSo, maxErrorSo))
+    resultArray.append((polySo, polyVarChangedSo, boundsSo, intervalCenterSo,\
+                         maxErrorSo))
     realIntervalField = RealIntervalField(max(lowerBoundSa.parent().precision(),
                                               upperBoundSa.parent().precision()))
     boundsSa = pobyso_range_to_interval_so_sa(boundsSo, realIntervalField)
@@ -144,7 +145,13 @@
                                             currentScaledLowerBoundSa, 
                                             scaledUpperBoundSa, approxPrecSa, 
                                             internalSollyaPrecSa)
-        resultArray.append((polySo, boundsSo, intervalCenterSo, maxErrorSo))
+        # Change variable stuff
+        changeVarExpressionSo = sollya_lib_build_function_sub(
+                                  sollya_lib_build_function_free_variable(), 
+                                  sollya_lib_copy_obj(intervalCenterSo))
+        polyVarChangedSo = sollya_lib_evaluate(polySo, changeVarExpressionSo) 
+        resultArray.append((polySo, polyVarChangedSo, boundsSo, \
+                            intervalCenterSo, maxErrorSo))
         boundsSa = pobyso_range_to_interval_so_sa(boundsSo, realIntervalField)
     sollya_lib_clear_obj(functionSo)
     sollya_lib_clear_obj(degreeSo)
@@ -188,13 +195,14 @@
    
 def slz_polynomial_and_interval_to_sage(polyRangeCenterErrorSo):
     polynomialSa = pobyso_get_poly_so_sa(polyRangeCenterErrorSo[0])
+    polynomialChangedVarSa = pobyso_get_poly_so_sa(polyRangeCenterErrorSo[1])
     intervalSa = \
-            pobyso_get_interval_from_range_so_sa(polyRangeCenterErrorSo[1])
+            pobyso_get_interval_from_range_so_sa(polyRangeCenterErrorSo[2])
     centerSa = \
-            pobyso_get_constant_as_rn_with_rf_so_sa(polyRangeCenterErrorSo[2])
+            pobyso_get_constant_as_rn_with_rf_so_sa(polyRangeCenterErrorSo[3])
     errorSa = \
-            pobyso_get_constant_as_rn_with_rf_so_sa(polyRangeCenterErrorSo[3])
-    return((polynomialSa, intervalSa, centerSa, errorSa))
+            pobyso_get_constant_as_rn_with_rf_so_sa(polyRangeCenterErrorSo[4])
+    return((polynomialSa, polynomialChangedVarSa, intervalSa, centerSa, errorSa))
     # End slz_polynomial_and_interval_to_sage
 
 print "sageSLZ loaded..."
