Menu ▾ ▴

#2290 Assume applies "fuzz" to floats and bfloats

open
nobody
5
2012-11-18
2011-10-31
No

(%i66) assume(sss > 1.0/3);
(%o66) [sss > 0.333333333333333]
(%i67) is(sss > 1.0/3 + 1.0e-5);
(%o67) unknown <<< OK
(%i68) is(sss > 1.0/3 + 1.0e-10);
(%o68) true <<< !!!!

Same thing for bfloats.

(%i69) fpprec:100$
(%i70) assume(ttt > 1.0b0/3)$
(%i71) is(ttt > 1.0b0/3 + 1.0b-10);
(%o71) true

Strangely, this doesn't happen for round numbers:

(%i72) assume(uuu > 1.0b0)$
(%i73) is(uuu > 1.0b0 + 1.0b-100);
(%o73) unknown

Though facts() reports that the facts are recorded in bfloat, perhaps they are internally rounded to rationals???

Discussion


Log in to post a comment.