delorie.com/archives/browse.cgi | search |
Peter Clifton: ... > Indeed... text representations of floating point numbers take a lot of > computation to turn into the correct binary machine value. This is one of > the main reasons big 3D models in STEP format are slow to load. (There are > lots of irrational numbers represented in text format, base 10). > > It is very easy to write a fast ASCII to double conversion, but only if you > make some assumptions and sacrifice accuracy. Doing correct conversion - > which yields the closest binary floating point number to the decimal > floating point number described is hard to preform correctly, and time > consuming. > > Hypothetically, I think the best compromise is a format which has a > lossless translation between text and binary representations. ... You can use hex, you don't have to convert it to/from base 10. Regards, /Karl Hammar ----------------------------------------------------------------------- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |