public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/19079] New: dbl-64/wordsize-64 lround based on llround incorrect for ILP32
@ 2015-10-06 23:36 jsm28 at gcc dot gnu.org
  2015-10-07  0:41 ` [Bug math/19079] " jsm28 at gcc dot gnu.org
  2015-10-07  0:41 ` cvs-commit at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-10-06 23:36 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 19079
           Summary: dbl-64/wordsize-64 lround based on llround incorrect
                    for ILP32
           Product: glibc
           Version: 2.22
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---

The implementation of lround in dbl-64/wordsize-64 as an alias or wrapper for
llround is always incorrect when long is not 64-bit, because it misses required
exceptions in overflow cases.  E.g., for MIPS n32 modified to use this code:

Failure: lround (0x1p31): Exception "Invalid operation" not set
Failure: lround (0x1p32): Exception "Invalid operation" not set
Failure: lround (0x1p33): Exception "Invalid operation" not set
Failure: lround (-0x1p32): Exception "Invalid operation" not set
Failure: lround (-0x1p33): Exception "Invalid operation" not set
Failure: lround (-0x1p63): Exception "Invalid operation" not set
Failure: lround_downward (0x1p31): Exception "Invalid operation" not set
Failure: lround_downward (0x1p32): Exception "Invalid operation" not set
Failure: lround_downward (0x1p33): Exception "Invalid operation" not set
Failure: lround_downward (-0x1p32): Exception "Invalid operation" not set
Failure: lround_downward (-0x1p33): Exception "Invalid operation" not set
Failure: lround_downward (-0x1p63): Exception "Invalid operation" not set
Failure: lround_towardzero (0x1p31): Exception "Invalid operation" not set
Failure: lround_towardzero (0x1p32): Exception "Invalid operation" not set
Failure: lround_towardzero (0x1p33): Exception "Invalid operation" not set
Failure: lround_towardzero (-0x1p32): Exception "Invalid operation" not set
Failure: lround_towardzero (-0x1p33): Exception "Invalid operation" not set
Failure: lround_towardzero (-0x1p63): Exception "Invalid operation" not set
Failure: lround_upward (0x1p31): Exception "Invalid operation" not set
Failure: lround_upward (0x1p32): Exception "Invalid operation" not set
Failure: lround_upward (0x1p33): Exception "Invalid operation" not set
Failure: lround_upward (-0x1p32): Exception "Invalid operation" not set
Failure: lround_upward (-0x1p33): Exception "Invalid operation" not set
Failure: lround_upward (-0x1p63): Exception "Invalid operation" not set

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


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

end of thread, other threads:[~2015-10-07  0:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-06 23:36 [Bug math/19079] New: dbl-64/wordsize-64 lround based on llround incorrect for ILP32 jsm28 at gcc dot gnu.org
2015-10-07  0:41 ` [Bug math/19079] " jsm28 at gcc dot gnu.org
2015-10-07  0:41 ` cvs-commit at gcc dot gnu.org

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