public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/15235] New: Spurious overflows for expl ldbl128-ibm
@ 2013-03-06 11:53 azanella at linux dot vnet.ibm.com
  2013-03-06 12:38 ` [Bug math/15235] Spurious underflow exception " azanella at linux dot vnet.ibm.com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: azanella at linux dot vnet.ibm.com @ 2013-03-06 11:53 UTC (permalink / raw)
  To: glibc-bugs

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

             Bug #: 15235
           Summary: Spurious overflows for expl ldbl128-ibm
           Product: glibc
           Version: 2.18
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
        AssignedTo: unassigned@sourceware.org
        ReportedBy: azanella@linux.vnet.ibm.com
    Classification: Unclassified


PowerPC shows spurious underflows for expl
(-744.44006192138126231410729844608163411L). The issue is, unlike the dbl-64
implementation, ldbl-128ibm does hold underflow exceptions when scaling down
subnormal results.

-- 
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] 8+ messages in thread

* [Bug math/15235] Spurious underflow exception for expl ldbl128-ibm
  2013-03-06 11:53 [Bug math/15235] New: Spurious overflows for expl ldbl128-ibm azanella at linux dot vnet.ibm.com
@ 2013-03-06 12:38 ` azanella at linux dot vnet.ibm.com
  2013-03-06 12:43 ` azanella at linux dot vnet.ibm.com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: azanella at linux dot vnet.ibm.com @ 2013-03-06 12:38 UTC (permalink / raw)
  To: glibc-bugs

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

Adhemerval Zanella Netto <azanella at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Spurious overflows for expl |Spurious underflow
                   |ldbl128-ibm                 |exception for expl
                   |                            |ldbl128-ibm

-- 
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] 8+ messages in thread

* [Bug math/15235] Spurious underflow exception for expl ldbl128-ibm
  2013-03-06 11:53 [Bug math/15235] New: Spurious overflows for expl ldbl128-ibm azanella at linux dot vnet.ibm.com
  2013-03-06 12:38 ` [Bug math/15235] Spurious underflow exception " azanella at linux dot vnet.ibm.com
@ 2013-03-06 12:43 ` azanella at linux dot vnet.ibm.com
  2013-03-06 13:54 ` joseph at codesourcery dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: azanella at linux dot vnet.ibm.com @ 2013-03-06 12:43 UTC (permalink / raw)
  To: glibc-bugs

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

Adhemerval Zanella Netto <azanella at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware    |azanella at linux dot
                   |dot org                     |vnet.ibm.com
   Target Milestone|---                         |2.18
           Severity|normal                      |minor

-- 
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] 8+ messages in thread

* [Bug math/15235] Spurious underflow exception for expl ldbl128-ibm
  2013-03-06 11:53 [Bug math/15235] New: Spurious overflows for expl ldbl128-ibm azanella at linux dot vnet.ibm.com
  2013-03-06 12:38 ` [Bug math/15235] Spurious underflow exception " azanella at linux dot vnet.ibm.com
  2013-03-06 12:43 ` azanella at linux dot vnet.ibm.com
@ 2013-03-06 13:54 ` joseph at codesourcery dot com
  2013-03-06 14:16 ` azanella at linux dot vnet.ibm.com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: joseph at codesourcery dot com @ 2013-03-06 13:54 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2013-03-06 13:53:31 UTC ---
Why do you think that's spurious?  The result is in the subnormal range, 
so an underflow exception is correct and it would be a bug if it were 
missing.  (Indeed, the subnormal range for IBM long double is wider than 
that for double, although in this case the result is subnormal for both 
double and IBM long double.)

-- 
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] 8+ messages in thread

* [Bug math/15235] Spurious underflow exception for expl ldbl128-ibm
  2013-03-06 11:53 [Bug math/15235] New: Spurious overflows for expl ldbl128-ibm azanella at linux dot vnet.ibm.com
                   ` (2 preceding siblings ...)
  2013-03-06 13:54 ` joseph at codesourcery dot com
@ 2013-03-06 14:16 ` azanella at linux dot vnet.ibm.com
  2013-03-06 15:03 ` joseph at codesourcery dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: azanella at linux dot vnet.ibm.com @ 2013-03-06 14:16 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from Adhemerval Zanella Netto <azanella at linux dot vnet.ibm.com> 2013-03-06 14:16:23 UTC ---
I followed your idea on 28afd92dbdb4fef4358051aad5cb944a9527a4b5 where
you added a libc_feholdexcept_setround (&env, FE_TONEAREST) (later
replaced to SET_RESTORE_ROUND (FE_TONEAREST)).

The exception holding on dbl-64 prevent this implementation to also
create an underflow exception with same argument (-744.44...) . More
specifically:

146     if (res == (res + eps*cor))
147     { binexp.i[HIGH_HALF] = 0x00100000;
148       retval = (res-1.0)*binexp.x;
149       goto ret;
150     }

Also creates an underflow without the feholdexcept being set.

-- 
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] 8+ messages in thread

* [Bug math/15235] Spurious underflow exception for expl ldbl128-ibm
  2013-03-06 11:53 [Bug math/15235] New: Spurious overflows for expl ldbl128-ibm azanella at linux dot vnet.ibm.com
                   ` (3 preceding siblings ...)
  2013-03-06 14:16 ` azanella at linux dot vnet.ibm.com
@ 2013-03-06 15:03 ` joseph at codesourcery dot com
  2013-03-07  0:12 ` azanella at linux dot vnet.ibm.com
  2014-06-13 18:44 ` fweimer at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: joseph at codesourcery dot com @ 2013-03-06 15:03 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2013-03-06 15:03:16 UTC ---
On Wed, 6 Mar 2013, azanella at linux dot vnet.ibm.com wrote:

> I followed your idea on 28afd92dbdb4fef4358051aad5cb944a9527a4b5 where
> you added a libc_feholdexcept_setround (&env, FE_TONEAREST) (later
> replaced to SET_RESTORE_ROUND (FE_TONEAREST)).

The point of that patch was that precision-extension techniques

(a) generally only work in round-to-nearest mode;

(b) are liable to create spurious underflows from internal calculations 
that do not reflect underflow in the final result.

> The exception holding on dbl-64 prevent this implementation to also
> create an underflow exception with same argument (-744.44...) . More

Then that's a bug in the double code; the exception should be present when 
the final result underflows.  Please file a separate bug report in 
Bugzilla (making sure of course that the argument you give is exactly 
representable in double).

-- 
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] 8+ messages in thread

* [Bug math/15235] Spurious underflow exception for expl ldbl128-ibm
  2013-03-06 11:53 [Bug math/15235] New: Spurious overflows for expl ldbl128-ibm azanella at linux dot vnet.ibm.com
                   ` (4 preceding siblings ...)
  2013-03-06 15:03 ` joseph at codesourcery dot com
@ 2013-03-07  0:12 ` azanella at linux dot vnet.ibm.com
  2014-06-13 18:44 ` fweimer at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: azanella at linux dot vnet.ibm.com @ 2013-03-07  0:12 UTC (permalink / raw)
  To: glibc-bugs

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

Adhemerval Zanella Netto <azanella at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #4 from Adhemerval Zanella Netto <azanella at linux dot vnet.ibm.com> 2013-03-07 00:12:07 UTC ---
You are correct: it is not a spurious underflow, the input indeed should create
an underflow exception. I'll close the bug.

-- 
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] 8+ messages in thread

* [Bug math/15235] Spurious underflow exception for expl ldbl128-ibm
  2013-03-06 11:53 [Bug math/15235] New: Spurious overflows for expl ldbl128-ibm azanella at linux dot vnet.ibm.com
                   ` (5 preceding siblings ...)
  2013-03-07  0:12 ` azanella at linux dot vnet.ibm.com
@ 2014-06-13 18:44 ` fweimer at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 18:44 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

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


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

end of thread, other threads:[~2014-06-13 18:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-06 11:53 [Bug math/15235] New: Spurious overflows for expl ldbl128-ibm azanella at linux dot vnet.ibm.com
2013-03-06 12:38 ` [Bug math/15235] Spurious underflow exception " azanella at linux dot vnet.ibm.com
2013-03-06 12:43 ` azanella at linux dot vnet.ibm.com
2013-03-06 13:54 ` joseph at codesourcery dot com
2013-03-06 14:16 ` azanella at linux dot vnet.ibm.com
2013-03-06 15:03 ` joseph at codesourcery dot com
2013-03-07  0:12 ` azanella at linux dot vnet.ibm.com
2014-06-13 18:44 ` fweimer at redhat 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).