This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Couple of math functions need to be Perl_ so that
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 1 Mar 2000 05:35:53 +0000 (05:35 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 1 Mar 2000 05:35:53 +0000 (05:35 +0000)
they are correctly long double, especially the frexp()
in sv_vcatpvfn() (spotted by Spider Boardman).

p4raw-id: //depot/cfgperl@5390

pp.c
sv.c

diff --git a/pp.c b/pp.c
index 70babce..d0a9959 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -905,7 +905,7 @@ PP(pp_pow)
     djSP; dATARGET; tryAMAGICbin(pow,opASSIGN);
     {
       dPOPTOPnnrl;
-      SETn( pow( left, right) );
+      SETn( Perl_pow( left, right) );
       RETURN;
     }
 }
@@ -1010,8 +1010,8 @@ PP(pp_modulo)
 #endif
 
            /* Backward-compatibility clause: */
-           dright = floor(dright + 0.5);
-           dleft  = floor(dleft + 0.5);
+           dright = Perl_floor(dright + 0.5);
+           dleft  = Perl_floor(dleft + 0.5);
 
            if (!dright)
                DIE(aTHX_ "Illegal modulus zero");
diff --git a/sv.c b/sv.c
index 73c15e7..7bb1fdd 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -6207,7 +6207,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
            need = 0;
            if (c != 'e' && c != 'E') {
                i = PERL_INT_MIN;
-               (void)frexp(nv, &i);
+               (void)Perl_frexp(nv, &i);
                if (i == PERL_INT_MIN)
                    Perl_die(aTHX_ "panic: frexp");
                if (i > 0)