nroots(x^2-2,0,r) returns 1 for an endpoint r that is provably strictly below sqrt(2)
Maxima 5.49post, SBCL 2.6.7.
The endpoint is silently replaced by a rational approximation controlled by ratepsilon, which moves it across the root. The same endpoint supplied as an exact rational is counted correctly.
(%i1) display2d:false$
(%i2) ratprint:false$
(%i3) fpprec:50$
(%i4) a: bfloat(sqrt(2)) - 1b-18$
(%i5) r: rationalize(a)$
(%i6) is(num(r)^2-2*denom(r)^2 < 0);
(%o6) true
(%i7) nroots(x^2-2,0,a);
(%o7) 1
(%i8) nroots(x^2-2,0,r);
(%o8) 0
(%i9) nroots(x^2-2,0,1.414213562373095);
(%o9) 1
(%i10) nroots(x^2-2,0,rationalize(1.414213562373095));
(%o10) 0
Expected: (%o7) and (%o9) = 0.
(%o6) is an exact integer test proving the endpoint lies strictly below sqrt(2), so no root of x^2-2 lies in the half-open interval. The bigfloat case is the worse half: the approximation truncates near 15 digits however large fpprec is, so a 50-digit endpoint is silently demoted. Setting bftorat:true or ratepsilon:1b-40 restores 0 in both cases.