Floats and Decimals 2

BlitzMax Forums/BlitzMax Programming/Floats and Decimals 2

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.


The reason Blitzmax probably doesn't round floats when printing, is because if it did then you couldn't print the real float value.



Bingo.

BlitzMax's float->string conversion attempts to produce the most accurate representation of the underlying value as possible.

So it should now be possible to write a float to a file, as a string, and read back exactly the same value - an oft. requested feature of Plus/B3D etc.

I didn't really give this much thought pre Max, but I now feel strongly that this is the only sane approach for a 'built-in' float->string conversion to take.