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

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>
This commit is contained in:
Michael Kerrisk 2020-05-23 12:20:59 +02:00
parent 839c0fe92a
commit 2aadb86241
1 changed files with 16 additions and 15 deletions

View File

@ -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)