This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/26253] fallback scalbn doesn't handle denormals correctly
- From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Sep 2007 02:24:47 -0000
- Subject: [Bug libfortran/26253] fallback scalbn doesn't handle denormals correctly
- References: <bug-26253-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from dave at hiauly1 dot hia dot nrc dot ca 2007-09-20 02:24 -------
Subject: Re: fallback scalbn doesn't handle denormals correctly
> For some reason, I had completely forgotten about ldexp(). But as it is C89, it
> should be available, and as all GCC supported targets now have (FLT_RADIX ==
> 2), it should fix the problem. John, could you confirm that the following patch
> fixes the testsuite failure?
Testing is underway but this looks close to obvious. From the HP-UX 11.11
manpage for scalbn:
The scalbn() function returns x * r**n, where r is the radix of the
machine's floating-point arithmetic. When r is 2 (as it is on all
PA-RISC systems), scalbn() is equivalent to ldexp().
Thanks,
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26253