emacs-devel
[Top][All Lists]
Advanced

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

Re: Code for converting between Elisp and Calc floats


From: James Cloos
Subject: Re: Code for converting between Elisp and Calc floats
Date: Thu, 22 Oct 2009 16:04:54 -0400
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux)

>>>>> "Jay" == Jay Belanger <address@hidden> writes:

Jay>   +--------------------+----------------------------------------+
Jay>   |10                  |79bit binary IEEE is used by Lisp floats|
Jay>   +--------------------+----------------------------------------+

Jay> #  elif (DBL_MANT_DIG == 1+64 \
Jay>             && DBL_MIN_EXP == 1+-16382 \
Jay>             && DBL_MAX_EXP == 1+16383)
Jay> #    define HAVE_DOUBLE_SIZEOF 10
Jay> #  elif (DBL_MANT_DIG == 1+112 \
Jay>             && DBL_MIN_EXP == 1+-16382 \
Jay>             && DBL_MAX_EXP == 1+16383)
Jay> #    define HAVE_DOUBLE_SIZEOF 16
Jay> #  else
Jay> #    define HAVE_DOUBLE_SIZEOF 0
Jay> #  endif

As there is no implied bit in the i387's 80-bit float; I suspect
that the DBL_MANT_DIG == 1+64 will never match.

Also -- and I've no idea whether this is relevant -- the 128 bit long
doubles used on IBM's mainframes (and perhaps elsewhere) are the sum
of two 64 bit doubles; they have more significant bits, but their
exponents are no larger than a double.

-JimC
-- 
James Cloos <address@hidden>         OpenPGP: 1024D/ED7DAEA6




reply via email to

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