[A83] Re: 83p os


[Prev][Next][Index][Thread]

[A83] Re: 83p os



robvanwijk@gmx.net writes:
> For ease of calculation, lets say we want 9 accurate decimal digits.
> 10^9 ~ 2^30 (because 1000 = 10^3 ~ 2^10 = 1024). So 9 decimal
> digits more or less correspond to 30 binary digits, right? (Another
> way of looking at it: 2^-30 < 10^-9, meaning if the 31st binary digit
> is wrong, that won't affect the first 9 decimal digits.)

Try it with 1/3.  No matter how many binary digits you have, you'll still be
incorrect.  You need something like BCD to do things accurately.  Binary can
get you "close enough" for many applications, such as 3D engines on slow
platforms, but it isn't nearly accurate enough for general numerical work.

--
David Phillips <david@acz.org>
http://david.acz.org/




Follow-Ups: References: