[A83] Re: 83p os


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

[A83] Re: 83p os




Okay, then maybe more than one extra digit.
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.)
There are 8 bits in a byte, so 30 binary digits will fit in 4 bytes, where
9 decimal digits need 4 and a half byte. I could very well be missing
something, but I'd say that working internally with binary encoded
numbers would be easier, faster and less space-consuming without
sacrificing accuracy.

Rob van Wijk

> 
> No that's not the problem that Ti want's to circumvent. Binary FP works
> with adding 1/(n^2) numbers together. So you can't really code a decimal
> FP
> number like 0,3...
> 
> 1/ 4 = 0.25
> 1/32 = 0.03125
> 1/64 = 0.015625
>        --- +
>        0.296875
> 
> ad infinitum, you won't really get decimal precission. It's not the
> same...
> 
> 	Henk Poley <><
> 
> PS: There are probably better examples...
> 

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!




Follow-Ups: References: