Skip to contentSkip to conversation

log1p.3: Document fixes to give EDOM or ERANGE on error

PATCH In review Alex Henrie 2 participants 2 messages Jul 15, 2017 – Aug 15, 2017 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 log1p.3: Document fixes to give EDOM or ERANGE on error

The bug https://www.sourceware.org/bugzilla/show_bug.cgi?id=6792
was fixed in glibc 2.22.

---
 man3/log1p.3 | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)
man3/log1p.3 +22 -12
index ae647a0d2..a303007be 100644
@@ -115,26 +115,22 @@ when calling these functions.
 The following errors can occur:
 .TP
 Domain error: \fIx\fP is less than \-1
-.\" .I errno
-.\" is set to
-.\" .BR EDOM .
+.I errno
+is set to
+.BR EDOM
+(but see BUGS).
 An invalid floating-point exception
 .RB ( FE_INVALID )
 is raised.
 .TP
 Pole error: \fIx\fP is \-1
-.\" .I errno
-.\" is set to
-.\" .BR ERANGE .
+.I errno
+is set to
+.BR ERANGE
+(but see BUGS).
 A divide-by-zero floating-point exception
 .RB ( FE_DIVBYZERO )
 is raised.
-.PP
-These functions do not set
-.IR errno .
-.\" FIXME . Is it intentional that these functions do not set errno?
-.\" log(), log2(), log10() do set errno
-.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6792
 .SH ATTRIBUTES
 For an explanation of the terms used in this section, see
 .BR attributes (7).
@@ -152,6 +148,20 @@ T}	Thread safety	MT-Safe
 .SH CONFORMING TO
 C99, POSIX.1-2001, POSIX.1-2008.
 .\" BSD
+.SH BUGS
+Before version 2.22, the glibc implementation did not set
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6792
+.I errno
+to
+.B EDOM
+when a domain error occurred.
+
+Before version 2.22, the glibc implementation did not set
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6792
+.I errno
+to
+.B ERANGE
+when a range error occurred.
 .SH SEE ALSO
 .BR exp (3),
 .BR expm1 (3),
Signature · 6 lines
2.13.2

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to a message not in the archive
Quoted 2 lines · Alex Henrie

The bug https://www.sourceware.org/bugzilla/show_bug.cgi?id=6792
was fixed in glibc 2.22.

Thanks, Alex. Applied.

Cheers,

Michael

Quoted 66 lines
---
 man3/log1p.3 | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)
man3/log1p.3 +22 -12
index ae647a0d2..a303007be 100644
@@ -115,26 +115,22 @@ when calling these functions.
 The following errors can occur:
 .TP
 Domain error: \fIx\fP is less than \-1
-.\" .I errno
-.\" is set to
-.\" .BR EDOM .
+.I errno
+is set to
+.BR EDOM
+(but see BUGS).
 An invalid floating-point exception
 .RB ( FE_INVALID )
 is raised.
 .TP
 Pole error: \fIx\fP is \-1
-.\" .I errno
-.\" is set to
-.\" .BR ERANGE .
+.I errno
+is set to
+.BR ERANGE
+(but see BUGS).
 A divide-by-zero floating-point exception
 .RB ( FE_DIVBYZERO )
 is raised.
-.PP
-These functions do not set
-.IR errno .
-.\" FIXME . Is it intentional that these functions do not set errno?
-.\" log(), log2(), log10() do set errno
-.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6792
 .SH ATTRIBUTES
 For an explanation of the terms used in this section, see
 .BR attributes (7).
@@ -152,6 +148,20 @@ T}	Thread safety	MT-Safe
 .SH CONFORMING TO
 C99, POSIX.1-2001, POSIX.1-2008.
 .\" BSD
+.SH BUGS
+Before version 2.22, the glibc implementation did not set
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6792
+.I errno
+to
+.B EDOM
+when a domain error occurred.
+
+Before version 2.22, the glibc implementation did not set
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6792
+.I errno
+to
+.B ERANGE
+when a range error occurred.
 .SH SEE ALSO
 .BR exp (3),
 .BR expm1 (3),
Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html