public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/18031] New: [ldbl-128ibm] modfl problems
@ 2015-02-25 23:07 jsm28 at gcc dot gnu.org
  2020-08-13 11:37 ` [Bug math/18031] " jakub at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-02-25 23:07 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 18031
           Summary: [ldbl-128ibm] modfl problems
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org

The ldbl-128ibm implementation of modfl has several issues:

* In the case for high part exponent < 52,
(((i0&i)|(i1&0x7fffffffffffffffLL))==0) is not a correct test for integer
argument; the latter part effectively tests just if the low part is a power of
2.  Example: an argument of 0x1.ffffffffffffffp51L is wrongly treated as being
an integer.

* In that case, the handling of non-integers when detected as such fails to
allow for the low part being of opposite sign to the integer high part. 
Example: 0x1.ffffffffffffff1p51L produces integer part 0x1p+52, fractional part
-0x1.ep-6.

* The case of high part exponent > 103 is treated as meaning the argument is an
integer, but that's not true even when restricted to numbers with 106
contiguous mantissa bits.  Example: 0x1.ffffffffffffffffffffffffff8p104L is
wrongly treated as being an integer.

* In the case for exponents 52 to 103, the test i1&i)==0 for being an integer
is completely bogus; the mask i = -1ULL>>(j0-52) is computed as if this were a
conventional IEEE format.  Example: 0x0.fffffffffffffcp52L is wrongly treated
as being an integer.

* When something is detected as not an integer in that case, the INSERT_WORDS64
(xlo, i1&(~i)) is always inserting a subnormal / zero value in the low part,
its exponent having been masked off earlier.  Example:
0x1.00000000000001111p56L gets integer part 0x1p+56 and fractional part
0x1.111p+0, which is more than 1.

-- 
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/18031] [ldbl-128ibm] modfl problems
  2015-02-25 23:07 [Bug math/18031] New: [ldbl-128ibm] modfl problems jsm28 at gcc dot gnu.org
@ 2020-08-13 11:37 ` jakub at redhat dot com
  2020-08-13 15:26 ` fw at deneb dot enyo.de
  2024-04-24  7:04 ` amodra at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at redhat dot com @ 2020-08-13 11:37 UTC (permalink / raw)
  To: glibc-bugs

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

Jakub Jelinek <jakub at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com,
                   |                            |jakub at redhat dot com
                URL|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=96600

--- Comment #1 from Jakub Jelinek <jakub at redhat dot com> ---
This has been filed today as a gcc bug when it is a glibc bug, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96600 for details.

-- 
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/18031] [ldbl-128ibm] modfl problems
  2015-02-25 23:07 [Bug math/18031] New: [ldbl-128ibm] modfl problems jsm28 at gcc dot gnu.org
  2020-08-13 11:37 ` [Bug math/18031] " jakub at redhat dot com
@ 2020-08-13 15:26 ` fw at deneb dot enyo.de
  2024-04-24  7:04 ` amodra at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fw at deneb dot enyo.de @ 2020-08-13 15:26 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fw at deneb dot enyo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fw at deneb dot enyo.de
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=96600

-- 
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/18031] [ldbl-128ibm] modfl problems
  2015-02-25 23:07 [Bug math/18031] New: [ldbl-128ibm] modfl problems jsm28 at gcc dot gnu.org
  2020-08-13 11:37 ` [Bug math/18031] " jakub at redhat dot com
  2020-08-13 15:26 ` fw at deneb dot enyo.de
@ 2024-04-24  7:04 ` amodra at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: amodra at gmail dot com @ 2024-04-24  7:04 UTC (permalink / raw)
  To: glibc-bugs

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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|amodra at gmail dot com            |

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

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

end of thread, other threads:[~2024-04-24  7:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-25 23:07 [Bug math/18031] New: [ldbl-128ibm] modfl problems jsm28 at gcc dot gnu.org
2020-08-13 11:37 ` [Bug math/18031] " jakub at redhat dot com
2020-08-13 15:26 ` fw at deneb dot enyo.de
2024-04-24  7:04 ` amodra 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).