3 ms·
In Jupyter I just wrote (1/3.0)*3.0-1.0==0.0 and got back the answer True no problem there.
by PaulHoule 3y ago
In Jupyter I just wrote
(1/3.0)*3.0-1.0==0.0
and got back the answer
True
no problem there.
- constantcrying 3y agoThe guy you replied to was talking about base 10 floats. As you can very easily see his example has to work if the arithmetic has the "best possible" property and the rounding mode is "to nearest". Pythons is unusable for numerics without numpy, which makes it a tiny bit less unusable.