Index: pobysoPythonSage/src/pobyso.py
===================================================================
--- pobysoPythonSage/src/pobyso.py	(revision 277)
+++ pobysoPythonSage/src/pobyso.py	(revision 278)
@@ -1791,11 +1791,11 @@
     #
     ## Tranform the Sage list of exponents into a Sollya list.
     exponentsListSo = pobyso_build_list_of_ints_sa_so(*exponentsList)
-    remezPolySo = sollya_lib_remez(functionSo, \
+    remezPolySo = sollya_lib_remez(functionSo,      \
                                    exponentsListSo, \
-                                   rangeSo, \
-                                   weightSo, \
-                                   qualitySo, \
+                                   rangeSo,         \
+                                   weightSo,        \
+                                   qualitySo,       \
                                    None)
     sollya_lib_clear_obj(functionSo)
     sollya_lib_clear_obj(exponentsListSo)
@@ -1843,6 +1843,8 @@
         #    the former as inutile after call.
         return (sollya_lib_copy_obj(polySo),
                 sollya_lib_copy_obj(currentApproxErrorSo))
+    #
+    ## Try to round the coefficients.
     degreeSa             = pobyso_polynomial_degree_so_sa(polySo)
     intervalSa           = pobyso_range_to_interval_so_sa(intervalSo)
     
@@ -1913,18 +1915,18 @@
         #   never happen since the rounding algorithm is proved. But some 
         #   circumstances may break it (e.g. internal precision of tools).
         if cerrSa > approxAccurSa:
-            if iterIndex > 0: # Round 1 and beyond.
+            if iterIndex == 0: # Round 0 is agressive rounding, got round 1 (proved rounding)
                 sollya_lib_clear_obj(resPolySo)
                 sollya_lib_clear_obj(infNormSo)
+                iterIndex += 1
+                continue
+            else: # Round 1 and beyond : just return the oroginal polynomial.
+                sollya_lib_clear_obj(resPolySo)
+                sollya_lib_clear_obj(infNormSo)
                 #### Do not return the arguments but copies: the caller may free
                 #    free the former as inutile after call.
                 return (sollya_lib_copy_obj(polySo), 
                         sollya_lib_copy_obj(currentApproxErrorSo))
-            else: # Round 0 (agressive rounding), got round 1 (proved rounding)
-                sollya_lib_clear_obj(resPolySo)
-                sollya_lib_clear_obj(infNormSo)
-                iterIndex += 1
-                continue
         ### If get here it is because cerrSa <= approxAccurSa
         ### Approximation error of the new polynomial is acceptable.
         return (resPolySo, infNormSo)
Index: pobysoPythonSage/src/sageSLZ/sageSLZ.sage
===================================================================
--- pobysoPythonSage/src/sageSLZ/sageSLZ.sage	(revision 277)
+++ pobysoPythonSage/src/sageSLZ/sageSLZ.sage	(revision 278)
@@ -1495,7 +1495,10 @@
                                                     currentRangeSo, 
                                                     absoluteErrorTypeSo)
     maxErrorSa = pobyso_get_constant_as_rn_with_rf_so_sa(maxErrorSo)
-    while maxErrorSa > approxAccurSa:
+    ## Expression "approxAccurSa/2" (instead of just approxAccurSa) is added 
+    #  since we use polynomial shaving. In order for it to work, we must start 
+    #  with a better accuracy.
+    while maxErrorSa > approxAccurSa/2:
         print "++Approximation error:", maxErrorSa.n()
         sollya_lib_clear_obj(polySo)
         sollya_lib_clear_obj(intervalCenterSo)
@@ -1627,6 +1630,7 @@
     - the center of the interval;
     - the maximum error in the approximation of the input functionSo by the
       output polynomial ; this error <= approxAccurSaS.
+      
     Changes fom v 01:
         extra verbose.
     """
@@ -1664,7 +1668,10 @@
                                                     absoluteErrorTypeSo)
     maxErrorSa = pobyso_get_constant_as_rn_with_rf_so_sa(maxErrorSo)
     print "...after Taylor expansion."
-    while maxErrorSa > approxAccurSa:
+    ## Expression "approxAccurSa/2" (instead of just approxAccurSa) is added 
+    #  since we use polynomial shaving. In order for it to work, we must start 
+    #  with a better accuracy.
+    while maxErrorSa > approxAccurSa/2:
         print "++Approximation error:", maxErrorSa.n()
         sollya_lib_clear_obj(polySo)
         sollya_lib_clear_obj(intervalCenterSo)
