On Sun, Jul 18, 2010 at 2:32 PM, Aaron Lewis <aaron.lewis1989@gmail.com>
wrote:
wrote:
Yes. 12.340 has five significant digits. If you want to store it with
just two significant digits you get 12.
The maximum number you can store in a IEEE double is +infinity of course.
A 64 bit double has 52-bit mantissa, together with 1 sign bit it gives
you almost 16 decimal significant digits.
But like other things in life: It's not the size that maters, it's how
you use it. (see math(3) and look for ULP)
Be careful converting your number to decimal if you want to keep
maximum precision.
--
Floor Terra <floort@gmail.com>
www: http://brobding.mine.nu/