This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/19235] New: [powerpc64] lround, lroundf, llround, llroundf spurious "inexact" exceptions


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

            Bug ID: 19235
           Summary: [powerpc64] lround, lroundf, llround, llroundf
                    spurious "inexact" exceptions
           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: ---
              Host: powerpc64*-*-*

Similar to bug 19134 for powerpc32, the powerpc64 implementations of lround,
lroundf, llround, llroundf can raise spurious "inexact" exceptions for integer
arguments from adding 0.5 then converting to integer (this does not apply to
the power5+ version for double, which uses the frin instruction which is
defined never to raise "inexact"; I don't know why power5+ doesn't use that
version for float as well).  For float:

Failure: lround (2097151.0): Exception "Inexact" set
Failure: lround_downward (2097151.0): Exception "Inexact" set
Failure: lround_towardzero (2097151.0): Exception "Inexact" set
Failure: lround_upward (2097151.0): Exception "Inexact" set
Failure: llround (2097151.0): Exception "Inexact" set
Failure: llround_downward (2097151.0): Exception "Inexact" set
Failure: llround_towardzero (2097151.0): Exception "Inexact" set
Failure: llround_upward (2097151.0): Exception "Inexact" set

For double:

Failure: lround (0x1p31): Exception "Inexact" set
Failure: lround (0x1p32): Exception "Inexact" set
Failure: lround (0x1p33): Exception "Inexact" set
Failure: lround (-0x1p31): Exception "Inexact" set
Failure: lround (-0x1p32): Exception "Inexact" set
Failure: lround (-0x1p33): Exception "Inexact" set
Failure: lround (0x7fffff80p0): Exception "Inexact" set
Failure: lround (0x7fffffffp0): Exception "Inexact" set
Failure: lround (-0x80000001p0): Exception "Inexact" set
Failure: lround (-0x80000100p0): Exception "Inexact" set
Failure: lround (2097151.0): Exception "Inexact" set
Failure: lround (8388608.0): Exception "Inexact" set
Failure: lround (16777216.0): Exception "Inexact" set
Failure: lround (2199023255552.0): Exception "Inexact" set
Failure: lround (4398046511104.0): Exception "Inexact" set
Failure: lround (281474976710656.0): Exception "Inexact" set
Failure: lround (0x1.fffffep+23): Exception "Inexact" set
Failure: lround (-0x1.fffffep+23): Exception "Inexact" set
Failure: lround (0x1.000002p+23): Exception "Inexact" set
Failure: lround (-0x1.000002p+23): Exception "Inexact" set
Failure: lround (0x1.fffffep+23): Exception "Inexact" set
Failure: lround (-0x1.fffffep+23): Exception "Inexact" set

and similar for llround and for other rounding modes.

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]