Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: About exact results and exact endpoints



Dear Nick and others,

On Wed, 2013-02-13 at 14:27 +0000, N.M. Maclaren wrote:
> On Feb 13 2013, Hossam A. H. Fahmy wrote:
> >On Tue, 2013-02-12 at 21:30 -0800, Richard Fateman wrote:
> >
> >> It is amusing to consider that [1/3, 0.1d0] could either be converted,
> >> with some loss,
> >> to two floats [0.3333...3, 0.1d0]
> >> or without loss to two rationals, 
> >> 
> >> [1/3,   3602879701896397/ 2^55]
> >> 
> >In fact, 3602879701896397/ 2^55 =
> >0.1000000000000000055511151231257827021181583404541015625
> >and not 0.1. 
> >
> >It is impossible to get an exact rational representation of the vast
> >majority of decimal fractions using only a power of 2 denominator. That
> >is the mathematical reason that lead to the inclusion of decimal
> >floating point specification in IEEE 754-2008. 
> 
> I am sorry, but that misuse of the word "mathematical" sticks in my
> gullet.
> 
> The fact that a fixed size of decimal floating-point can represent a
> wider range of decimal fractions than binary (and a stronger statement
> does not hold) is no different from the fact that a binary one can
> represent a wider range of binary fractions than decimal.  There was
> and is no mathematical reason that ten is a preferred base over two,
> or even three.
> 

I agree that my use of the word "mathematical" was somewhat loose. Thank
you for a more accurate statement. The key words in this statement when
making the comparisons between different radix systems are "fixed
size" (or "finite precision"). Regardless of how big that size might be
there are always some fractions that one can cite which require an
infinite or at least a wider precision. The case of decimal 0.1 requires
an infinite precision in a binary system. 

I did not claim that generally 10 is preferred over 2 mathematically.
The preference comes from human conventions and habits not from
mathematics.

Anyhow, we both agree that the decimal 0.1 cannot be represented exactly
by the rational given by Richard and hence both of his representations
have some loss. 

Thanks
--
Hossam A. H. Fahmy
Associate Professor
Electronics and Communications Engineering
Cairo University
Egypt

Attachment: signature.asc
Description: This is a digitally signed message part