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: Irix6 long doubles implemented wrong? (27_io/ostream_inserter_arith)


On Jan 19, 2003, Alexandre Oliva <aoliva@redhat.com> wrote:

> This means we'll consider denormals even numbers that have only the
> lower double as a denormal.  Which is in line with one of the
> approaches I had suggested (not that it counts much; I've probably
> enumerated all approaches that could possibly make sense, and most
> that couldn't :-D

> This conclusion was drawn based on the formal definition of the
> normalized and denormalized sets, as well as the informal definitions
> of normalized (those values of a floating point type F that provide
> the full precision allowed by that type) and denormalized (those that
> don't), regardless of the actual representation.  I believe this
> settles it.

> Anyway, if I had the time, I'd start by adding 53 to the minimum
> exponent range in real.c

This patch implements this change.  I've already done some testing on
IRIX, and it appears to give correct results, but bootstrap and
libstdc++ testing is still running.  Ok to install in 3.3 and mainline
if it completes?

> and fp-bit.h

There's no such thing there.  The code already works as expected.

> bumping up the mantissa size by 1

Wrong, as explained in another e-mail.

> and reverting the denorm_p changes I made in real.c and c-common.c.

Or rather not even putting them in.

> This would probably require some tweaks in the functions that convert
> into and out of ibm_extended_format in real.c,

It doesn't, they're simple enough that the change in the minimum
exponent doesn't affect them at all.

> and probably some similar fixes in fp-bit.c

No changes needed there either.  It's not really concerned about where
the boundary between normals and denormals is.

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>
	* real.c (ibm_extended_format): Add 53 to minimum exponent.

Index: gcc/real.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/real.c,v
retrieving revision 1.105
diff -u -p -r1.105 real.c
--- gcc/real.c 17 Nov 2002 20:20:39 -0000 1.105
+++ gcc/real.c 26 Jan 2003 10:47:06 -0000
@@ -3292,7 +3292,7 @@ const struct real_format ibm_extended_fo
     2,
     1,
     53 + 53,
-    -1021,
+    -1021 + 53,
     1024,
     true,
     true,
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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