# Example 1 in Nagasaka's ISSAC'2002 paper: F := expand( (x^2 + u*x + 2*u - 1)*(x^3 + u^2*x - u + 7) + 0.2*x); NF := (0.0032 * u*x^2 + 0.9360*x^2 + 0.9407 * u*x + 0.0283*x + 1.8791 * u - 0.9396) * (-0.0020*u^2*x^3 + 0.0033*u*x^3 + 1.0766*x^3 +7.4501 - 1.0651*u - 0.0015*u^2 + 0.0126*x + 0.0025*u*x + 1.0666*u^2*x - 0.0276*x^2 - 0.0136*u*x^2 - 0.0011*u^2*x^2); # Tolerance 0.000753 in Nagasaka's paper. read NearestNpoly: NF := NearestNpoly(F, 5, x, u); # # tolerance 0.000953 with Version 0.01. # # tolerance 0.001107 with Version 0.02 # (error got larger because in this version we only allow non-zero # coefficients where F itself has a non-zero coefficient). # # This tolerance 0.000953 in Version 0.01 is significantly larger than # the tolerance 0.000753 mentioned in Nagasaka's paper, so our program is # not close to optimal in this example, which probably means that O(epsilon^2) # is not small compared to O(epsilon) in this example. This example shows # then that we should still implement the Newton iteration on the factors # of NF to bring NF closer to F.