Patch ilogb.3: add-llogb-llogbf-llogbl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



POSIX adds a version that returns long int
perhaps for float128

Signed-off-by: Radisson <Radisson97@xxxxxx>
---
 man3/ilogb.3 | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/man3/ilogb.3 b/man3/ilogb.3
index a56416fba..339a31bed 100644
--- a/man3/ilogb.3
+++ b/man3/ilogb.3
@@ -28,7 +28,8 @@
 .\"
 .TH ILOGB 3 2021-03-22 "" "Linux Programmer's Manual"
 .SH NAME
-ilogb, ilogbf, ilogbl \- get integer exponent of a floating-point value
+ilogb, ilogbf, ilogbl, llogb, llogbf, llogbl \- get integer exponent of a
+floating-point value
 .SH SYNOPSIS
 .nf
 .B #include <math.h>
@@ -36,6 +37,10 @@ ilogb, ilogbf, ilogbl \- get integer exponent of a floating-point value
 .BI "int ilogb(double " x );
 .BI "int ilogbf(float " x );
 .BI "int ilogbl(long double " x );
+.PP
+.BI "long int llogb(double " x );
+.BI "long int llogbf(float " x );
+.BI "long int llogbl(long double " x );
 .fi
 .PP
 Link with \fI\-lm\fP.
@@ -69,6 +74,11 @@ are equivalent to the corresponding
 .BR logb (3)
 functions, cast to
 .IR int .
+.PP
+The
+.B llogb (3)
+functions do the same, but cast to
+.IR "long int" .
 .SH RETURN VALUE
 On success, these functions return the exponent of
 .IR x ,
@@ -79,13 +89,14 @@ If
 is zero, then a domain error occurs, and the functions return
 .\" the POSIX.1 spec for logb() says logb() gives pole error for this
 .\" case, but for ilogb() it says domain error.
-.BR FP_ILOGB0 .
+.BR FP_ILOGB0 or
+.BR FP_LLOGB0 .
 .\" glibc: The numeric value is either `INT_MIN' or `-INT_MAX'.
 .PP
-If
 .I x
 is a NaN, then a domain error occurs, and the functions return
-.BR FP_ILOGBNAN .
+.BR FP_ILOGBNAN or
+.BR FP_LLOGBNAN .
 .\" glibc: The numeric value is either `INT_MIN' or `INT_MAX'.
 .\" On i386, FP_ILOGB0 and FP_ILOGBNAN have the same value.
 .PP
@@ -139,18 +150,24 @@ Interface	Attribute	Value
 T{
 .BR ilogb (),
 .BR ilogbf (),
-.BR ilogbl ()
+.BR ilogbl (),
+.BR llogb (),
+.BR llogbf (),
+.BR llogbl ()
 T}	Thread safety	MT-Safe
 .TE
 .hy
 .ad
 .sp 1
 .SH CONFORMING TO
+.IP ilogb 5
 C99, POSIX.1-2001, POSIX.1-2008.
+.IP llogb 5
+TS 18661-3:2015, available since glibc 2.25
 .SH BUGS
 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794
 Before version 2.16, the following bugs existed in the
-glibc implementation of these functions:
+glibc implementation of the ilogb functions:
 .IP * 3
 The domain error case where
 .I x
--
2.26.2





[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux