In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/46a884f429c14897d39237b56bb8740e7ea8b38e?hp=af26e4f23ae11a43d1a3ac56ed110a974e093811>
- Log ----------------------------------------------------------------- commit 46a884f429c14897d39237b56bb8740e7ea8b38e Author: Jarkko Hietaniemi <[email protected]> Date: Sun Aug 31 21:53:39 2014 -0400 POSIX math: M_SQRT2 and M_2_SQRTPI were misspelled. And therefore not constant-exported. ----------------------------------------------------------------------- Summary of changes: ext/POSIX/Makefile.PL | 7 +++---- ext/POSIX/lib/POSIX.pm | 16 ++++++++-------- ext/POSIX/t/export.t | 6 +++--- ext/POSIX/t/math.t | 6 ++++-- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL index 0a39aeb..b8f559a 100644 --- a/ext/POSIX/Makefile.PL +++ b/ext/POSIX/Makefile.PL @@ -111,10 +111,9 @@ push @names, {name=>$_, type=>"NV"} LDBL_MAX_10_EXP LDBL_MAX_EXP LDBL_MIN_10_EXP LDBL_MIN_EXP)); push @names, {name=>$_, type=>"NV"} - foreach (qw(FP_ILOGB0 FP_ILOGBNAN FP_INFINITE - FP_NAN FP_NORMAL FP_SUBNORMAL FP_ZERO - M_E M_LOG2E M_LOG10E M_LN2 M_PI M_PI_2 - M_PI_4 M_1_PI M_2_PI M_2_SQRT_PI M_SQRT_2 M_SQRT1_2)); + foreach (qw(FP_ILOGB0 FP_ILOGBNAN FP_INFINITE FP_NAN FP_NORMAL + FP_SUBNORMAL FP_ZERO M_1_PI M_2_PI M_2_SQRTPI M_E M_LN2 + M_LOG10E M_LOG2E M_PI M_PI_2 M_PI_4 M_SQRT1_2 M_SQRT2)); push @names, {name=>$_, type=>"IV"} foreach (qw(FE_DOWNWARD FE_TONEAREST FE_TOWARDZERO FE_UPWARD)); diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm index baa99ed..121a936 100644 --- a/ext/POSIX/lib/POSIX.pm +++ b/ext/POSIX/lib/POSIX.pm @@ -299,14 +299,14 @@ our %EXPORT_TAGS = ( LC_MONETARY LC_NUMERIC LC_TIME NULL localeconv setlocale)], - math_h => [qw(HUGE_VAL INFINITY Inf FP_ILOGB0 FP_ILOGBNAN FP_INFINITE - FP_NAN FP_NORMAL FP_SUBNORMAL FP_ZERO M_E M_LOG2E - M_LOG10E M_LN2 M_PI M_PI_2 M_PI_4 M_1_PI M_2_PI - M_2_SQRT_PI M_SQRT_2 M_SQRT1_2 NAN NaN acos acosh asin - asinh atan atanh cbrt ceil copysign cosh erf erfc - exp2 expm1 fabs fdim fma fmax fmin floor fmod - fpclassify frexp hypot ilogb isgreater - isgreaterequal isfinite isinf isless islessequal + math_h => [qw(FP_ILOGB0 FP_ILOGBNAN FP_INFINITE FP_NAN FP_NORMAL + FP_SUBNORMAL FP_ZERO HUGE_VAL INFINITY Inf M_1_PI + M_2_PI M_2_SQRTPI M_E M_LN2 M_LOG10E M_LOG2E M_PI + M_PI_2 M_PI_4 M_SQRT1_2 M_SQRT2 NAN NaN acos acosh + asin asinh atan atanh cbrt ceil copysign cosh erf + erfc exp2 expm1 fabs fdim floor fma fmax fmin fmod + fpclassify frexp hypot ilogb isfinite isgreater + isgreaterequal isinf isless islessequal islessgreater isnan isnormal isunordered j0 j1 jn ldexp lgamma log10 log1p log2 logb lrint modf nan nearbyint nextafter nexttoward pow remainder remquo diff --git a/ext/POSIX/t/export.t b/ext/POSIX/t/export.t index 63a3281..24a318f 100644 --- a/ext/POSIX/t/export.t +++ b/ext/POSIX/t/export.t @@ -50,9 +50,9 @@ my %expect = ( LDBL_MAX_10_EXP LDBL_MAX_EXP LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP LINK_MAX LONG_MAX LONG_MIN L_ctermid L_cuserid L_tmpname MAX_CANON - MAX_INPUT MB_CUR_MAX MB_LEN_MAX M_1_PI M_2_PI - M_2_SQRT_PI M_E M_LN2 M_LOG10E M_LOG2E M_PI M_PI_2 - M_PI_4 M_SQRT1_2 M_SQRT_2 NAME_MAX NAN NCCS NDEBUG + MAX_INPUT MB_CUR_MAX MB_LEN_MAX M_1_PI M_2_PI M_2_SQRTPI + M_E M_LN2 M_LOG10E M_LOG2E M_PI M_PI_2 M_PI_4 + M_SQRT1_2 M_SQRT2 NAME_MAX NAN NCCS NDEBUG NGROUPS_MAX NOFLSH NULL NaN OPEN_MAX OPOST O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC O_WRONLY PARENB PARMRK PARODD diff --git a/ext/POSIX/t/math.t b/ext/POSIX/t/math.t index c949843..0f0642b 100644 --- a/ext/POSIX/t/math.t +++ b/ext/POSIX/t/math.t @@ -56,11 +56,13 @@ cmp_ok(tanh(1), '==', -tanh(-1), 'tanh(1) == -tanh(-1)'); SKIP: { unless ($Config{d_acosh}) { - skip "no acosh, suspecting no C99 math", 28; + skip "no acosh, suspecting no C99 math", 30; } if ($^O =~ /Win32|VMS/) { - skip "running in $^O, C99 math support uneven", 28; + skip "running in $^O, C99 math support uneven", 30; } + cmp_ok(abs(M_SQRT2 - 1.4142135623731), '<', 1e-9, "M_SQRT2"); + cmp_ok(abs(M_E - 2.71828182845905), '<', 1e-9, "M_E"); cmp_ok(abs(M_PI - 3.14159265358979), '<', 1e-9, "M_PI"); cmp_ok(abs(asinh(1) - 0.881373587019543), '<', 1e-9, "asinh"); cmp_ok(abs(cbrt(8) - 2), '<', 1e-9, "cbrt"); -- Perl5 Master Repository
