[Coco] Fun with Floating-Point Numbers

johnmarkmelanie at gmail.com johnmarkmelanie at gmail.com
Mon May 5 10:51:32 EDT 2025


All,

What happens when you add one to a large floating-point number.

10 X=8.58993459E9
20 X=X-100
30 PRINT X
40 X=X+1
50 FOR T=1 TO 600:NEXT T
60 GOTO 30

There's likely some rounding going on. And it stops counting at the value
shown in line 10.

John Mark Mobley



More information about the Coco mailing list