FLT_MIN_10_EXP FLT_MIN_EXP FLT_RADIX LDBL_DIG LDBL_MANT_DIG
LDBL_MAX_10_EXP LDBL_MAX_EXP LDBL_MIN_10_EXP LDBL_MIN_EXP));
+push @names, {name=>$_, type=>"NV"}
+ foreach (qw(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));
+
push @names, {name=>$_, type=>"IV", default=>["IV", "0"]}
foreach (qw(_POSIX_ARG_MAX _POSIX_CHILD_MAX _POSIX_CHOWN_RESTRICTED
_POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT _POSIX_NAME_MAX
LC_MONETARY LC_NUMERIC LC_TIME NULL
localeconv setlocale)],
- math_h => [qw(HUGE_VAL acos asin atan ceil cosh fabs floor fmod
- frexp ldexp log10 modf pow sinh tan tanh)],
+ math_h => [qw(HUGE_VAL
+ 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
+ acos asin atan ceil cosh fabs floor fmod
+ frexp ldexp log10 modf pow sinh tan tanh)],
pwd_h => [],
LDBL_EPSILON LDBL_MANT_DIG LDBL_MAX 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 NAME_MAX NCCS NDEBUG
- NGROUPS_MAX NOFLSH NULL OPEN_MAX OPOST O_ACCMODE O_APPEND
+ 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 NCCS NDEBUG NGROUPS_MAX NOFLSH NULL
+ 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 PATH_MAX PIPE_BUF RAND_MAX R_OK
SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK SA_RESETHAND
}
}
-use Test::More tests => 111;
+use Test::More tests => 112;
use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write
- errno localeconv dup dup2 lseek access);
+ errno localeconv dup dup2 lseek access math_h);
use strict 'subs';
sub next_test {
cmp_ok($!, '==', POSIX::ENOTDIR);
}
+# math_h
+cmp_ok(abs(M_PI - 3.14159265358979), '<', 1e9);
+
# Check that output is not flushed by _exit. This test should be last
# in the file, and is not counted in the total number of tests.
if ($^O eq 'vos') {