* m4/spacing.m4: Use scalbn[f,l] if ldexp[f,l] is unavailable.
* m4/rrspacing.m4: Ditto.
* generated/spacing_r4.c: Regenerated.
* generated/spacing_r8.c: Ditto.
* generated/spacing_r10.c: Ditto.
* generated/spacing_r16.c: Ditto.
* generated/rrspacing_r4.c: Ditto.
* generated/rrspacing_r8.c: Ditto.
* generated/rrspacing_r10.c: Ditto.
* generated/rrspacing_r16.c: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117703
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-10-13 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ * m4/spacing.m4: Use scalbn[f,l] if ldexp[f,l] is unavailable.
+ * m4/rrspacing.m4: Ditto.
+ * generated/spacing_r4.c: Regenerated.
+ * generated/spacing_r8.c: Ditto.
+ * generated/spacing_r10.c: Ditto.
+ * generated/spacing_r16.c: Ditto.
+ * generated/rrspacing_r4.c: Ditto.
+ * generated/rrspacing_r8.c: Ditto.
+ * generated/rrspacing_r10.c: Ditto.
+ * generated/rrspacing_r16.c: Ditto.
+
2006-10-06 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/15441
#include "libgfortran.h"
-#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FABSL) && defined (HAVE_FREXPL) && defined (HAVE_LDEXPL)
+#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FABSL) && defined (HAVE_FREXPL)
extern GFC_REAL_10 rrspacing_r10 (GFC_REAL_10 s, int p);
export_proto(rrspacing_r10);
if (x == 0.)
return 0.;
frexpl (s, &e);
+#if defined (HAVE_LDEXPL)
return ldexpl (x, p - e);
+#else
+ return scalbnl (x, p - e);
+#endif
+
}
#endif
#include "libgfortran.h"
-#if defined (HAVE_GFC_REAL_16) && defined (HAVE_FABSL) && defined (HAVE_FREXPL) && defined (HAVE_LDEXPL)
+#if defined (HAVE_GFC_REAL_16) && defined (HAVE_FABSL) && defined (HAVE_FREXPL)
extern GFC_REAL_16 rrspacing_r16 (GFC_REAL_16 s, int p);
export_proto(rrspacing_r16);
if (x == 0.)
return 0.;
frexpl (s, &e);
+#if defined (HAVE_LDEXPL)
return ldexpl (x, p - e);
+#else
+ return scalbnl (x, p - e);
+#endif
+
}
#endif
#include "libgfortran.h"
-#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FABSF) && defined (HAVE_FREXPF) && defined (HAVE_LDEXPF)
+#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FABSF) && defined (HAVE_FREXPF)
extern GFC_REAL_4 rrspacing_r4 (GFC_REAL_4 s, int p);
export_proto(rrspacing_r4);
if (x == 0.)
return 0.;
frexpf (s, &e);
+#if defined (HAVE_LDEXPF)
return ldexpf (x, p - e);
+#else
+ return scalbnf (x, p - e);
+#endif
+
}
#endif
#include "libgfortran.h"
-#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FABS) && defined (HAVE_FREXP) && defined (HAVE_LDEXP)
+#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FABS) && defined (HAVE_FREXP)
extern GFC_REAL_8 rrspacing_r8 (GFC_REAL_8 s, int p);
export_proto(rrspacing_r8);
if (x == 0.)
return 0.;
frexp (s, &e);
+#if defined (HAVE_LDEXP)
return ldexp (x, p - e);
+#else
+ return scalbn (x, p - e);
+#endif
+
}
#endif
#include "libgfortran.h"
-#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FREXPL) && defined (HAVE_LDEXPL)
+#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FREXPL)
extern GFC_REAL_10 spacing_r10 (GFC_REAL_10 s, int p, int emin, GFC_REAL_10 tiny);
export_proto(spacing_r10);
frexpl (s, &e);
e = e - p;
e = e > emin ? e : emin;
+#if defined (HAVE_LDEXPL)
return ldexpl (1., e);
+#else
+ return scalbnl (1., e);
+#endif
}
#endif
#include "libgfortran.h"
-#if defined (HAVE_GFC_REAL_16) && defined (HAVE_FREXPL) && defined (HAVE_LDEXPL)
+#if defined (HAVE_GFC_REAL_16) && defined (HAVE_FREXPL)
extern GFC_REAL_16 spacing_r16 (GFC_REAL_16 s, int p, int emin, GFC_REAL_16 tiny);
export_proto(spacing_r16);
frexpl (s, &e);
e = e - p;
e = e > emin ? e : emin;
+#if defined (HAVE_LDEXPL)
return ldexpl (1., e);
+#else
+ return scalbnl (1., e);
+#endif
}
#endif
#include "libgfortran.h"
-#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FREXPF) && defined (HAVE_LDEXPF)
+#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FREXPF)
extern GFC_REAL_4 spacing_r4 (GFC_REAL_4 s, int p, int emin, GFC_REAL_4 tiny);
export_proto(spacing_r4);
frexpf (s, &e);
e = e - p;
e = e > emin ? e : emin;
+#if defined (HAVE_LDEXPF)
return ldexpf (1., e);
+#else
+ return scalbnf (1., e);
+#endif
}
#endif
#include "libgfortran.h"
-#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FREXP) && defined (HAVE_LDEXP)
+#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FREXP)
extern GFC_REAL_8 spacing_r8 (GFC_REAL_8 s, int p, int emin, GFC_REAL_8 tiny);
export_proto(spacing_r8);
frexp (s, &e);
e = e - p;
e = e > emin ? e : emin;
+#if defined (HAVE_LDEXP)
return ldexp (1., e);
+#else
+ return scalbn (1., e);
+#endif
}
#endif
include(`mtype.m4')dnl
-`#if defined (HAVE_'real_type`) && defined (HAVE_FABS'Q`) && defined (HAVE_FREXP'Q`) && defined (HAVE_LDEXP'Q`)'
+`#if defined (HAVE_'real_type`) && defined (HAVE_FABS'Q`) && defined (HAVE_FREXP'Q`)'
extern real_type rrspacing_r`'kind (real_type s, int p);
export_proto(rrspacing_r`'kind);
if (x == 0.)
return 0.;
frexp`'q (s, &e);
+`#if defined (HAVE_LDEXP'Q`)'
return ldexp`'q (x, p - e);
+#else
+ return scalbn`'q (x, p - e);
+#endif
+
}
#endif
include(`mtype.m4')dnl
-`#if defined (HAVE_'real_type`) && defined (HAVE_FREXP'Q`) && defined (HAVE_LDEXP'Q`)'
+`#if defined (HAVE_'real_type`) && defined (HAVE_FREXP'Q`)'
extern real_type spacing_r`'kind (real_type s, int p, int emin, real_type tiny);
export_proto(spacing_r`'kind);
frexp`'q (s, &e);
e = e - p;
e = e > emin ? e : emin;
+`#if defined (HAVE_LDEXP'Q`)'
return ldexp`'q (1., e);
+#else
+ return scalbn`'q (1., e);
+#endif
}
#endif