Floating point problem

Blitz3D Forums/Blitz3D Beginners Area/Floating point problem

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Is there a problem with floating point numbers? I'm trying to get a number to increase by a tiny amount with each loop, but I want it to stay steady, so I'm using a millisecond timer to keep it accurate. Each pass, I use the command x=x+(timer*0.001). The timer is generally about 20, since that's how long a loop is taking, but it fails to increment the variable properly (yes, they are both FP vars). If I pause the main loop slightly, it does work properly, or if a huge amount is happening on the screen and the loop takes a bit longer, the variable starts increasing, but when the timer is 20 or so milliseconds, it does nothing.

Is this a known problem and is there a way I can fix it?