This is the mail archive of the 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]

[Bug libfortran/26253] fallback scalbn doesn't handle denormals correctly

------- Comment #6 from fxcoudert at gcc dot gnu dot org  2007-09-19 09:16 -------
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?

Index: libgfortran/intrinsics/c99_functions.c
--- libgfortran/intrinsics/c99_functions.c      (revision 128540)
+++ libgfortran/intrinsics/c99_functions.c      (working copy)
@@ -341,7 +341,11 @@ log10f(float x)
 scalbn(double x, int y)
+#if (FLT_RADIX == 2) && defined(HAVE_LDEXP)
+  return ldexp (x, y);
   return x * pow(FLT_RADIX, y);


fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
         AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch
   Last reconfirmed|2006-02-17 20:33:15         |2007-09-19 09:16:22
               date|                            |
   Target Milestone|---                         |4.3.0

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