surprising precision

Toon Moene toon@moene.org
Thu Mar 4 18:41:00 GMT 2010


Bob Plantz wrote:

> By the way, it may interest you to know that half the floating point 
> values (in IEEE 754 format) are in the range -2.0 to +2.0, not inclusive.

By far the best question in the programming course of the University I 
attended (years before IEEE 754):

On <this machine> integers are represented as sign magnitude 32 bit numbers.

Floating point numbers on that machine are specified according to the 
following 32 bit format <follows description of format>.

Question:

Are there

A. More floating point numbers than integer numbers.
B. More integer numbers than floating point numbers.
C. An equal number of both.

[ The only better question in a course I ever encountered was during an
   introductory in Climate Research at my Institute (KNMI):

   1. Define the average temperature on Earth.
   2. Describe how you would set up a measurement campaign to show
      that the average is changing.

]

A hint not given in that course: "The operative word is 'measurement'".

-- 
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html



More information about the Gcc-help mailing list