Login
Back to forumSee the full topicGo to last reply

Posted By

Csabo
on 2018-08-21
08:37:18
 Re: 9^2 bug

That's cool, but it's not exactly a bug, just the fact that floating point operations are inherently inaccurate.

How about this, I think it's even funnier. Ever seen the Plus/4 claim that 3 is not equal to 3? happy

0 A=3 : B=5 : C=A/B : C=C*B
1 PRINT A;
2 IF A=C THEN PRINT"=";:ELSE PRINT"<>";
3 PRINT C;

Result: 3 <> 3. Try it with other number pairs, most will be just fine, but for some (especially multiplies of 3, as you've noticed), there's some internal rounding error. It's normal, even JavaScript has a similar issue.



Back to top


Copyright © Plus/4 World Team, 2001-2024