public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/6799] nextafter() and nexttoward() doen't set errno on overflow/underflow errors
       [not found] <bug-6799-131@http.sourceware.org/bugzilla/>
@ 2012-03-01 17:00 ` jsm28 at gcc dot gnu.org
  2020-05-23 10:41 ` mtk.manpages at gmail dot com
  1 sibling, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-03-01 17:00 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=6799

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|aj at suse dot de           |unassigned at sourceware
                   |                            |dot org

--- Comment #4 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-03-01 16:58:53 UTC ---
Confirmed with current sources on x86 and x86_64.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug math/6799] nextafter() and nexttoward() doen't set errno on overflow/underflow errors
       [not found] <bug-6799-131@http.sourceware.org/bugzilla/>
  2012-03-01 17:00 ` [Bug math/6799] nextafter() and nexttoward() doen't set errno on overflow/underflow errors jsm28 at gcc dot gnu.org
@ 2020-05-23 10:41 ` mtk.manpages at gmail dot com
  1 sibling, 0 replies; 4+ messages in thread
From: mtk.manpages at gmail dot com @ 2020-05-23 10:41 UTC (permalink / raw)
  To: glibc-bugs

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

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

commit 7270e118be984434ed877ea29f036c6f9b2eec81
Author: Michael Kerrisk <mtk.manpages@gmail.com>
Date:   Sat May 23 12:09:45 2020 +0200

    nextafter.3: Since glibc 2.23, these functions do set errno

    Modify DESCRIPTION appropriately and add BUGS section.

    See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6799.

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

diff --git a/man3/nextafter.3 b/man3/nextafter.3
index 723cab7b9..551da5c9b 100644
--- a/man3/nextafter.3
+++ b/man3/nextafter.3
@@ -149,26 +149,21 @@ The following errors can occur:
 .TP
 Range error: result overflow
 .\" e.g., nextafter(DBL_MAX, HUGE_VAL);
-.\" .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: result is subnormal or underflows
 .\" e.g., nextafter(DBL_MIN, 0.0);
-.\" .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=6799
 .SH ATTRIBUTES
 For an explanation of the terms used in this section, see
 .BR attributes (7).
@@ -197,5 +192,10 @@ In glibc version 2.5 and earlier, these functions do not
raise an underflow
 floating-point
 .RB ( FE_UNDERFLOW )
 exception when an underflow occurs.
+.SH BUGS
+Before glibc version 2.23
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6799
+these functions did not set
+.IR errno .
 .SH SEE ALSO
 .BR nearbyint (3)

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug math/6799] nextafter() and nexttoward() doen't set errno on overflow/underflow errors
  2008-07-31 10:26 [Bug math/6799] New: nextafter() and nexttoward() doen't set errno on error mtk dot manpages at gmail dot com
  2008-07-31 10:38 ` [Bug math/6799] nextafter() and nexttoward() doen't set errno on overflow/underflow errors mtk dot manpages at gmail dot com
@ 2008-07-31 10:43 ` mtk dot manpages at gmail dot com
  1 sibling, 0 replies; 4+ messages in thread
From: mtk dot manpages at gmail dot com @ 2008-07-31 10:43 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From mtk dot manpages at gmail dot com  2008-07-31 10:42 -------
Sample runs demonstrating the problem:

$ /tmp/mt_nextafter dbl_max inf
errno == 0
fetestexcept() says:  FE_OVERFLOW FE_INEXACT
nextafter(1.79769313486231571e+308,inf)=inf
0 FE_OVERFLOW +inf

$ /tmp/mt_nextafter dbl_min 0
errno == 0
fetestexcept() says:  FE_UNDERFLOW FE_INEXACT
nextafter(2.22507385850720138e-308,0.00000000000000000e+00)=2.22507385850720089e-308
0 FE_UNDERFLOW subnormal

$ /tmp/mt_nexttoward dbl_max inf
errno == 0
fetestexcept() says:  FE_OVERFLOW FE_INEXACT
nexttoward(1.79769313486231571e+308,inf)=inf
0 FE_OVERFLOW +inf

$ /tmp/mt_nexttoward  dbl_min 0
errno == 0
fetestexcept() says:  FE_UNDERFLOW FE_INEXACT
nexttoward(2.22507385850720138e-308,0.000000000000000000000000000000000000e+00)=2.22507385850720089e-308
0 FE_UNDERFLOW subnormal


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6799

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug math/6799] nextafter() and nexttoward() doen't set errno on overflow/underflow errors
  2008-07-31 10:26 [Bug math/6799] New: nextafter() and nexttoward() doen't set errno on error mtk dot manpages at gmail dot com
@ 2008-07-31 10:38 ` mtk dot manpages at gmail dot com
  2008-07-31 10:43 ` mtk dot manpages at gmail dot com
  1 sibling, 0 replies; 4+ messages in thread
From: mtk dot manpages at gmail dot com @ 2008-07-31 10:38 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|nextafter() and nexttoward()|nextafter() and nexttoward()
                   |doen't set errno on overflow|doen't set errno on
                   |error                       |overflow/underflow errors


http://sourceware.org/bugzilla/show_bug.cgi?id=6799

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-23 10:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-6799-131@http.sourceware.org/bugzilla/>
2012-03-01 17:00 ` [Bug math/6799] nextafter() and nexttoward() doen't set errno on overflow/underflow errors jsm28 at gcc dot gnu.org
2020-05-23 10:41 ` mtk.manpages at gmail dot com
2008-07-31 10:26 [Bug math/6799] New: nextafter() and nexttoward() doen't set errno on error mtk dot manpages at gmail dot com
2008-07-31 10:38 ` [Bug math/6799] nextafter() and nexttoward() doen't set errno on overflow/underflow errors mtk dot manpages at gmail dot com
2008-07-31 10:43 ` mtk dot manpages at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).