This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Irix6 long doubles implemented wrong? (27_io/ostream_inserter_arith)
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, oldham at codesourcery dot com, ro at TechFak dot Uni-Bielefeld dot DE, rth at redhat dot com
- Date: 26 Jan 2003 08:51:19 -0200
- Subject: Re: Irix6 long doubles implemented wrong? (27_io/ostream_inserter_arith)
- Organization: GCC Team, Red Hat
- References: <200212170531.AAA15561@caip.rutgers.edu><or4r97diei.fsf@free.redhat.lsd.ic.unicamp.br><orisxmn2fv.fsf@free.redhat.lsd.ic.unicamp.br><oradiw3e9k.fsf@free.redhat.lsd.ic.unicamp.br><200212241434.JAA22361@caip.rutgers.edu><orhed32l12.fsf@free.redhat.lsd.ic.unicamp.br><orwulx34wh.fsf@free.redhat.lsd.ic.unicamp.br><orptrn4lr0.fsf@free.redhat.lsd.ic.unicamp.br><20030107221549.GR12992@redhat.com><or4r8hlw18.fsf@free.redhat.lsd.ic.unicamp.br><20030110011352.GF9245@redhat.com><200301191731.MAA18215@caip.rutgers.edu><or65slezv7.fsf@free.redhat.lsd.ic.unicamp.br>
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