Inherent imprecision of floating point variables

Dik T. Winter dik at cwi.nl
Wed Jun 27 11:11:32 AEST 1990


In article <44436 at ism780c.isc.com> marv at ism780.UUCP (Marvin Rubenstein) writes:
(Replying to articles dealing with exact arithmetic using floating point)
 > The problem has nothing to do with C or the precision of the machine's
 > floating point unit.  It has to do with the precision of the ASCII to float
 > and float to ASCII conversion routines.
The first sentence is correct; the second is bogus.  As has been noticed
before, it has to do with the impossiblility to represent all (decimal)
numbers on machines that have a non-decimal representation for fp numbers.

 >                                          This problem was addressed at the
 > SIGPLAN '90 conference on Program Language Design and Implementation.
I did not read the papers from this conference, but if they address
anything, it is not this problem.  What they might have addressed is the
problem how to write and read numbers such that a number once written and
read back will have exactly the same internal representation (note the order:
first write, next read back in).  I doubt this however, because this problem
has already been solved some 20 years ago (Algol 68 required it).  There might
have been improved algorithms.
--
dik t. winter, cwi, amsterdam, nederland
dik at cwi.nl



More information about the Comp.lang.c mailing list