ID:1244330
 
BYOND Version:498
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Firefox 20.0
Applies to:DM Language
Status: Deferred

This issue may be low priority or very difficult to fix, and has been put on the back burner for the time being.
Descriptive Problem Summary:
BYOND seems to have a strange quirk when calculating decimals, whole numbers on the other hand are fine. The bug seems to fix itself after a bit, but if you leave it running long enough the count will be permanently thrown off.

There must be some unknown condition which changes when the bug pops up. Sometimes I'll run it and it will glitch on the same number every time, then I'll run it again after compiling and it will glitch every time on a different number.



Code Snippet
world/New()
..()
var/count=0
spawn()
while(1)
count += 0.01
world<<"[count]"
sleep(world.tick_lag)


Expected Results:
The output should show a gradual increase of 0.01 at a time.

Actual Results:
At some point it substitutes a 0.009999 for a 0.01.

Workarounds
This may be an OS issue as others have said it worked fine on their PC.
0.01 cannot be represented in memory, it's either higher or lower, though it's still strange that you get different results between runs.
I've ran into this too before.
Tom changed status to 'Deferred'