This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_ldexp is one of ldexpl, scalbnl, or ldexp
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 11 Aug 2014 15:58:27 +0000 (11:58 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 14 Aug 2014 02:20:35 +0000 (22:20 -0400)
perl.h

diff --git a/perl.h b/perl.h
index d03c0e8..c8537c3 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1903,6 +1903,13 @@ EXTERN_C long double modfl(long double, long double *);
 #           define Perl_frexp(x,y) Perl_my_frexpl(x,y)
 #       endif
 #   endif
+#   ifdef HAS_LDEXPL
+#       define Perl_ldexp(x, y) ldexpl(x,y)
+#   else
+#       if defined(HAS_SCALBNL) && FLT_RADIX == 2
+#           define Perl_ldexp(x,y) scalbnl(x,y)
+#       endif
+#   endif
 #   ifndef Perl_isnan
 #       ifdef HAS_ISNANL
 #           define Perl_isnan(x) isnanl(x)
@@ -1953,6 +1960,7 @@ EXTERN_C long double modfl(long double, long double *);
 #   define Perl_fmod fmod
 #   define Perl_modf(x,y) modf(x,y)
 #   define Perl_frexp(x,y) frexp(x,y)
+#   define Perl_ldexp(x,y) ldexp(x,y)
 #endif
 
 /* rumor has it that Win32 has _fpclass() */