/**/ use QQ[x];
/**/ indent(RealRoots(x^2-2));
[
record[CoeffList := [-1, 0, 2], inf := -4, sup := 0],
record[CoeffList := [1, 0, -2], inf := 0, sup := 4]
]
/**/ RR := RealRoots((x^2-2)*(x-1), 10^(-5));
/**/ FloatStr(RR[1].inf,10); -- left end of interval
-1.414213562*10^0
/**/ FloatStr(RR[1].sup,10); -- right end of interval
-1.414213561*10^0
/**/ RR := RealRoots(x^2-2, 10^(-20), [0, 2]);
/**/ FloatStr(RR[1].inf, 20); -- print rational RR[1].inf in a comprehensible way
1.4142135623730950488*10^0
/**/ RR[1].inf; -- actual raional is rather incomprehensible
60153992292001127886258443119406264231/42535295865117307932921825928971026432
|