* Outdated comment in real.c (was: constant folding) [not found] ` <20090925001855.GU657@prunille.vinc17.org> @ 2009-09-25 2:33 ` Vincent Lefevre 2009-09-28 17:31 ` Kaveh R. GHAZI 0 siblings, 1 reply; 2+ messages in thread From: Vincent Lefevre @ 2009-09-25 2:33 UTC (permalink / raw) To: Kaveh Ghazi; +Cc: gcc [Cc to the gcc mailing-list] On 2009-09-25 02:18:55 +0200, Vincent Lefevre wrote: > Also, as EXP_BITS is the full (biased) exponent size, it seems that > the real.c comment is buggy (27 -> 26). Looking at the history: Index: real.h =================================================================== --- real.h (revision 107860) +++ real.h (revision 107861) @@ -35,7 +35,7 @@ }; #define SIGNIFICAND_BITS (128 + HOST_BITS_PER_LONG) -#define EXP_BITS (32 - 5) +#define EXP_BITS (32 - 6) #define MAX_EXP ((1 << (EXP_BITS - 1)) - 1) [...] but real.c wasn't updated: it still has denormal number fits in 17 exponent bits; we store 27. that comes from r83133. -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon) ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Outdated comment in real.c (was: constant folding) 2009-09-25 2:33 ` Outdated comment in real.c (was: constant folding) Vincent Lefevre @ 2009-09-28 17:31 ` Kaveh R. GHAZI 0 siblings, 0 replies; 2+ messages in thread From: Kaveh R. GHAZI @ 2009-09-28 17:31 UTC (permalink / raw) To: Vincent Lefevre; +Cc: gcc, gcc-patches On Fri, 25 Sep 2009, Vincent Lefevre wrote: > [Cc to the gcc mailing-list] > > On 2009-09-25 02:18:55 +0200, Vincent Lefevre wrote: > > Also, as EXP_BITS is the full (biased) exponent size, it seems that > > the real.c comment is buggy (27 -> 26). > > Looking at the history: > > -#define EXP_BITS (32 - 5) > +#define EXP_BITS (32 - 6) The following change fixes the comment. Tested with "make" on x86_64-unknown-linux-gnu. I'll install this as "obvious" tomorrow if nobody comments on the patch. --Kaveh 2009-09-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * real.c: Fix comment to reflect actual exponent size. diff -rup orig/egcc-SVN20090928/gcc/real.c egcc-SVN20090928/gcc/real.c --- orig/egcc-SVN20090928/gcc/real.c 2009-09-18 02:00:54.000000000 +0200 +++ egcc-SVN20090928/gcc/real.c 2009-09-28 18:06:06.000000000 +0200 @@ -57,7 +57,7 @@ Both of these requirements are easily satisfied. The largest target significand is 113 bits; we store at least 160. The smallest - denormal number fits in 17 exponent bits; we store 27. + denormal number fits in 17 exponent bits; we store 26. Note that the decimal string conversion routines are sensitive to rounding errors. Since the raw arithmetic routines do not themselves ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-28 16:24 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <E1Mqqop-0005k2-HH@quiche.loria.fr> [not found] ` <A02DAD6933AA490593D28C614961E00A@glap> [not found] ` <20090925001855.GU657@prunille.vinc17.org> 2009-09-25 2:33 ` Outdated comment in real.c (was: constant folding) Vincent Lefevre 2009-09-28 17:31 ` Kaveh R. GHAZI
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).