|
| "glen herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message
news:qdadnW50orKK3ufZRVn-sQ@comcast.com...
> robin wrote:
>
>
> The precision is between 21 and 24 for short,
I'm referring to the guaranteed precision.
> and between
> 56 and 53 for long. The algorithms for the most libraries
> were designed not to lose precision unnecessarily.
>
> 0.9 has 24 bits of precision in short float.
Well, only 21 bits. You can't count on more.
> Divide it by
> four and it loses two bits. Multiply or divide the result by four
> and you don't gain them back again, though the bits are again
> available. That is precision loss.
It isn't, because only 21 bits a guaranteed, and that's what you get.
BTW, if you divide an integer by 4, you lose two bits, and
you don't get them back when you multiply the result by 4.
And if you multiply .9 by 10 you don't get 9.
|
|