comparison error

Blitz3D Forums/Blitz3D Programming/comparison error

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.

At runtime there are no identical numbers unless both are defined at const, which makes the comparision pointless as you know the result upfront.

If you compare floats, always compare with an epsilon margin within they must be the same or do not use floating point bug fixed point math or something similar.

One thing that will cause further problems if you convert code it, which was mentioned by skid, is that the "old blitz" round the output result, so you don't have full float accuracy. On the other side, this behavior allows float = float checks up to a given point (around .001 - .005 accuracy with "normal" numbers *0 - 1000*)