Code Comments
Programming Forum and web based access to our favorite programming groups.moogie wrote: > I want to store a set of floating points which have a maximum of 8 > digits, sign and decimal point. > > i.e > values between -99999999.0 and 99999999.0 Some compilers have an data type Currency, which is a scaled integer (fixed point, e.g. 64 bits, divided by 10000). Such types are designed for somewhat lossless representation of floating point values, and fast calculations, not for compression. You seem to mean kind of BCD representation, based on decimal digits, what's not a widely supported data type. A conversion between the usual binary floating point values (base 2) and BCD (base 10) can result in unwanted loss of precision. DoDi
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.