read NearestNpoly; f1 := 92*x^3+44*x^2*y+40*x*y^2-67*y^3+8*x^2+66*x*y+68*y^2-95*x-62*y-18: f2 := 68*x^3+39*x^2*y+20*x*y^2+45*y^3-65*x^2-67*x*y+93*y^2+43*x+8*y+6: f := expand(f1*f2)/99; # Now introduce a significant round-off error: F := evalf(f, 2); # With such large error, we can not always expect the program to # work (hence the warning message) though it does work in this example: NF := NearestNpoly(F, 9); "Distance F to f is:", Distance(F, f); "Distance F to NF is:", Distance(F, NF); # Again, given the input F, we found a reducible polynomial NF that's # closer to F than f is. That NF is reducible is confirmed by the # monodromy computation (the monodromy is not transitive), or can also # be confirmed by the TrivialFactoring program: res := TrivialFactoring(NF, 9); Digits := 15: Distance(expand(res),NF): "Distance NF to res is:", evalf(%,6); Digits := 10: