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


--- Richard Henderson <rth@redhat.com> 的正文:> On Sun, Jul 04, 2004 at
10:57:26AM -0700, Tim Prince wrote:
> > >      /* 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
> 
> No, the "1" is implicit in the IEEE format.  There is no implicit
> bit in the real.c representation.  Thus "0.F" is correct.
It's the same with fortran.

In fact, IEEE just describes the storing format of floating point. 8 bits hold
the binary exponent with the range [-126, 127](normalized). In normalized form,
there is an implicit '1' in the fraction. Fortran uses "0.F x 2**e" REAL
concept model. The exponent range should be [-125,128].

Feng Wang

_________________________________________________________
Do You Yahoo!? 
100兆邮箱够不够用?雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/


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