In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/d7a0f0b000f94080cd0cb5efd28ae4b26f084294?hp=356ad745a622c0a0675fbc8f0abb7a0eb2e5ce51>
- Log ----------------------------------------------------------------- commit d7a0f0b000f94080cd0cb5efd28ae4b26f084294 Author: Jarkko Hietaniemi <[email protected]> Date: Fri Aug 21 08:25:10 2015 -0400 POSIX: mention the Inf, NaN constants; other small tweaks ----------------------------------------------------------------------- Summary of changes: ext/POSIX/lib/POSIX.pod | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/ext/POSIX/lib/POSIX.pod b/ext/POSIX/lib/POSIX.pod index a021d13..d0efb33 100644 --- a/ext/POSIX/lib/POSIX.pod +++ b/ext/POSIX/lib/POSIX.pod @@ -444,7 +444,7 @@ C<FE_TONEAREST> is like L</round>, C<FE_TOWARDZERO> is like L</trunc> [C99]. =item C<fesetround> -Sets the floating point rounding mode, see L</fegetround>. +Sets the floating point rounding mode, see L</fegetround> [C99]. =item C<fma> @@ -504,7 +504,10 @@ Returns one of FP_NORMAL FP_ZERO FP_SUBNORMAL FP_INFINITE FP_NAN -telling the class of the argument [C99]. +telling the class of the argument [C99]. C<FP_INFINITE> is positive +or negative infinity, C<FP_NAN> is not-a-number. C<FP_SUBNORMAL> +means subnormal numbers (also known as denormals), very small numbers +with low precision. C<FP_ZERO> is zero. C<FP_NORMAL> is all the rest. =item C<fprintf> @@ -698,6 +701,16 @@ For example C<ilogb(20)> is 4, as an integer. See also L</logb>. +=item C<Inf> + +The infinity as a constant: + + use POSIX qw(Inf); + my $pos_inf = +Inf; # Or just Inf. + my $neg_inf = -Inf; + +See also L</isinf>, and L</fpclassify>. + =item C<isalnum> Deprecated function whose use raises a warning, and which is slated to @@ -807,7 +820,7 @@ Floating point comparisons which handle the C<NaN> [C99]. Returns true if the argument is an infinity (positive or negative) [C99]. -See also L</isnan>, L</isfinite>, and L</fpclassify>. +See also L</Inf>, L</isnan>, L</isfinite>, and L</fpclassify>. =item C<islower> @@ -837,7 +850,7 @@ Note that you cannot test for "C<NaN>-ness" with since the C<NaN> is not equivalent to anything, B<including itself>. -See also L</nan>, L</isinf>, and L</fpclassify>. +See also L</nan>, L</NaN>, L</isinf>, and L</fpclassify>. =item C<isnormal> @@ -1213,6 +1226,15 @@ Return the integral and fractional parts of a floating-point number. See also L</round>. +=item C<NaN> + +The not-a-number as a constant: + + use POSIX qw(NaN); + my $nan = NaN; + +See also L</nan>, C</isnan>, and L</fpclassify>. + =item C<nan> my $nan = nan(); @@ -1248,7 +1270,7 @@ to explicitly set the payload. On some platforms like the 32-bit x86, (unless using the 80-bit long doubles) the signaling bit is not supported at all. -See also L</isnan>, L</setpayload> and L</issignaling>. +See also L</isnan>, L</NaN>, L</setpayload> and L</issignaling>. =item C<nearbyint> -- Perl5 Master Repository
