[Top][All Lists]

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

printf-frexp and the radix of floating point numbers

From: Paul Eggert
Subject: printf-frexp and the radix of floating point numbers
Date: Sun, 25 Feb 2007 08:48:21 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Bruno Haible <address@hidden> writes:

> This module assumes that the radix of floating-point numbers is 2. A safe
> assumption, I hope, 18 years after IEEE 754.

IBM mainframes use radix 16.  This is not likely to change so long as
there are IBM mainframes (which will be quite some time).  Modern IBM
mainframes support radix 2 as an option, but I suspect radix 16 is
still the normal default, for historical reasons.  So, for example, in
SAS C you'll find "#define FLT_RADIX 16".

I know of one radix-10 C host: tigcc, a GCC variant for Texas
Instrument calculators.  It's actively maintained: the latest release
was in October.  <http://tigcc.ticalc.org/>.  This one is more of a
curiosity, though.

Radix-10 floating point is making a bit of a comeback, by the way.
Usually, though, it's not via redefining 'double'.  See, for example,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]