This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove GMP in favor of MPFR


I wrote:

>>>
>>> I'm looking at the July 1, 2004 revision of the IEEE-754 standard.
>>> Table 1a shows
>>>             p    emax   emin
>>> binary32    24    127   -126
>>> binary64    53   1023  -1022
>>> binary128  113  16383 -16382
>>>

Paul wrote:

>>
>>I think these numbers come from gcc/real.c. However reading a bit further
>>uncovers the following comment:
>>      /* Recall that IEEE numbers are interpreted as 1.F x 2**exp,
>>         whereas the intermediate representation is 0.F x 2**exp.
> 
> That should be 0.5F x 2**exp

There isn't a "5" in the set of digits when writing the
significand in a binary representation.

> Yes, IEEE and Fortran differ by 1 in the definition of exponent.  C 
> <float.h> agrees with Fortran.  Source code which uses the C and Fortran 
> facilities must not have to be concerned with the different IEEE 
> definition.  You can't even tell from the raw number format.  To IEEE, the 
> bias is different by 1 from the bias which goes with the Fortran/C 
> definition.

Are you suggesting that we should use p, emin, and emax that are
consistent with float.h?

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]