[Bug math/6804] scalb() does not set errno on domain error

mtk.manpages at gmail dot com sourceware-bugzilla@sourceware.org
Sat May 23 10:44:44 GMT 2020


https://sourceware.org/bugzilla/show_bug.cgi?id=6804

--- Comment #6 from Michael Kerrisk <mtk.manpages at gmail dot com> ---
Fix documented for man-pages-5.07

commit ab5c28f9423931435a1cf41a0b058459b2bce998 (HEAD -> master)
Author: Michael Kerrisk <mtk.manpages@gmail.com>
Date:   Sat May 23 12:20:59 2020 +0200

    scalb.3: These functions now correctly set errno for the EDOM and ERANGE
cas
es

    Modify DESCRIPTION appropriately and add BUGS section.
    The fix was in glibc 2.20.

    See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6803
    and https://www.sourceware.org/bugzilla/show_bug.cgi?id=6804

    Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>

diff --git a/man3/scalb.3 b/man3/scalb.3
index 2db0bd9ad..c685b68eb 100644
--- a/man3/scalb.3
+++ b/man3/scalb.3
@@ -150,34 +150,28 @@ The following errors can occur:
 Domain error: \fIx\fP is 0, and \fIexp\fP is positive infinity, \
 or \fIx\fP is positive infinity and \fIexp\fP is negative infinity \
 and the other argument is not a NaN
-.\" .I errno
-.\" is set to
-.\" .BR EDOM .
+.I errno
+is set to
+.BR EDOM .
 An invalid floating-point exception
 .RB ( FE_INVALID )
 is raised.
 .TP
 Range error, overflow
-.\" .I errno
-.\" is set to
-.\" .BR ERANGE .
+.I errno
+is set to
+.BR ERANGE .
 An overflow floating-point exception
 .RB ( FE_OVERFLOW )
 is raised.
 .TP
 Range error, underflow
-.\" .I errno
-.\" is set to
-.\" .BR ERANGE .
+.I errno
+is set to
+.BR ERANGE .
 An underflow floating-point exception
 .RB ( FE_UNDERFLOW )
 is raised.
-.PP
-These functions do not set
-.IR errno .
-.\" FIXME . Is it intentional that these functions do not set errno?
-.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6803
-.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6804
 .SH ATTRIBUTES
 For an explanation of the terms used in this section, see
 .BR attributes (7).
@@ -215,6 +209,13 @@ are unstandardized;
 is nevertheless present on several other systems
 .\" Looking at header files: scalbf() is present on the
 .\" BSDs, Tru64, HP-UX 11, Irix 6.5; scalbl() is on HP-UX 11 and Tru64.
+.SH BUGS
+Before glibc 2.20,
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6803
+.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6804
+these functions did not set
+.I errno
+for domain and range errors.
 .SH SEE ALSO
 .BR ldexp (3),
 .BR scalbln (3)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list