summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-tumbleweed/man3/logb.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
commit4ad94864781f48b1a4b77f9cfb934622bf756ba1 (patch)
tree3900955c1886e6d2570fea7125ee1f01bafe876d /upstream/opensuse-tumbleweed/man3/logb.3
parentAdding upstream version 4.22.0. (diff)
downloadmanpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.tar.xz
manpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.zip
Adding upstream version 4.23.0.upstream/4.23.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/opensuse-tumbleweed/man3/logb.3')
-rw-r--r--upstream/opensuse-tumbleweed/man3/logb.330
1 files changed, 15 insertions, 15 deletions
diff --git a/upstream/opensuse-tumbleweed/man3/logb.3 b/upstream/opensuse-tumbleweed/man3/logb.3
index 1bde61bb..92059053 100644
--- a/upstream/opensuse-tumbleweed/man3/logb.3
+++ b/upstream/opensuse-tumbleweed/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-05-02 "Linux man-pages (unreleased)"
.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 <math.h>
-.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