From 9a6ff5bc53dedbaa601a1a76cbaf8a76afd60c9f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:41:06 +0200 Subject: Adding upstream version 6.7. Signed-off-by: Daniel Baumann --- man3/logb.3 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'man3/logb.3') diff --git a/man3/logb.3 b/man3/logb.3 index 1bde61b..1319d94 100644 --- a/man3/logb.3 +++ b/man3/logb.3 @@ -7,7 +7,7 @@ .\" .\" Inspired by a page by Walter Harms created 2002-08-10 .\" -.TH logb 3 2023-07-20 "Linux man-pages 6.05.01" +.TH logb 3 2024-03-12 "Linux man-pages 6.7" .SH NAME logb, logbf, logbl \- get exponent of a floating-point value .SH LIBRARY @@ -16,17 +16,17 @@ Math library .SH SYNOPSIS .nf .B #include -.PP +.P .BI "double logb(double " x ); .BI "float logbf(float " x ); .BI "long double logbl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR logb (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -35,7 +35,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR logbf (), .BR logbl (): .nf @@ -57,10 +57,11 @@ If .B FLT_RADIX is 2, .BI logb( x ) -is equal to -.BI floor(log2( x ))\fR, -except that it is probably faster. -.PP +is similar to +.BI floor(log2(fabs( x )))\f[R],\f[] +except that the latter may give an incorrect integer +due to intermediate rounding. +.P If .I x is subnormal, @@ -71,12 +72,12 @@ would have if it were normalized. .SH RETURN VALUE On success, these functions return the exponent of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is zero, then a pole error occurs, and the functions return @@ -85,7 +86,7 @@ is zero, then a pole error occurs, and the functions return or .RB \- HUGE_VALL , respectively. -.PP +.P If .I x is negative infinity or positive infinity, then @@ -95,7 +96,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Pole error: \fIx\fP is 0 @@ -105,7 +106,7 @@ Pole error: \fIx\fP is 0 A divide-by-zero floating-point exception .RB ( FE_DIVBYZERO ) is raised. -.PP +.P These functions do not set .IR errno . .\" FIXME . Is it intentional that these functions do not set errno? @@ -128,7 +129,6 @@ T{ .BR logbl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY -- cgit v1.2.3