Numerical accuracy. . .

Blitz3D Forums/Blitz3D Programming/Numerical accuracy. . .

I write accuracy-critical programs

Although you did not specify I would like to predetermine one possibility with an explanation:

DO NOT use floats in this situation. Floats are an estimate only. An estimate, guess, a ball park figure... Not precise.

Integers are your accurate data type.

If you need a floating point number to be numerically accurate then you will need to control your own data type. A quick method would be an integer that is 1000 times it's real value to hold 3 decimal places, etc.

I say again, floats are not meant to be accurate, for a computer to handle them completely precisely would be very slow.

Just because they are not actually that bad does not qualify them as accurate, they can and do get it wrong sometimes, although their accuracy is not effected by debug status to my knowledge.

BTW: whilst this may or may not be related to the reported "Pentium bug" which I thought was just an issue with P60's and P90's, you might like to know I first came across innacuracies in floats using a ZX-Spectrum, so I dont think it's a Blitz specific "feature" ;)