public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/15536] New: ulp (0x0.0p0) is not FP_SUBNORMAL!
@ 2013-05-26  9:29 schwab@linux-m68k.org
  2013-05-26  9:30 ` [Bug math/15536] " schwab@linux-m68k.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2013-05-26  9:29 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 15536
           Summary: ulp (0x0.0p0) is not FP_SUBNORMAL!
           Product: glibc
           Version: 2.18
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: schwab@linux-m68k.org
                CC: carlos at redhat dot com
            Target: powerpc*-*-*

The IBM long double version of ulp(0) returns 0, because scalbnl(1,-1127) is 0.

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


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

* [Bug math/15536] ulp (0x0.0p0) is not FP_SUBNORMAL!
  2013-05-26  9:29 [Bug math/15536] New: ulp (0x0.0p0) is not FP_SUBNORMAL! schwab@linux-m68k.org
@ 2013-05-26  9:30 ` schwab@linux-m68k.org
  2013-05-27 17:31 ` carlos at redhat dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2013-05-26  9:30 UTC (permalink / raw)
  To: glibc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.18

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


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

* [Bug math/15536] ulp (0x0.0p0) is not FP_SUBNORMAL!
  2013-05-26  9:29 [Bug math/15536] New: ulp (0x0.0p0) is not FP_SUBNORMAL! schwab@linux-m68k.org
  2013-05-26  9:30 ` [Bug math/15536] " schwab@linux-m68k.org
@ 2013-05-27 17:31 ` carlos at redhat dot com
  2013-05-31  5:39 ` carlos at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: carlos at redhat dot com @ 2013-05-27 17:31 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |carlos at redhat dot com

--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
Fixing this ASAP.

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


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

* [Bug math/15536] ulp (0x0.0p0) is not FP_SUBNORMAL!
  2013-05-26  9:29 [Bug math/15536] New: ulp (0x0.0p0) is not FP_SUBNORMAL! schwab@linux-m68k.org
  2013-05-26  9:30 ` [Bug math/15536] " schwab@linux-m68k.org
  2013-05-27 17:31 ` carlos at redhat dot com
@ 2013-05-31  5:39 ` carlos at redhat dot com
  2013-05-31 19:28 ` joseph at codesourcery dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: carlos at redhat dot com @ 2013-05-31  5:39 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joseph at codesourcery dot com

--- Comment #2 from Carlos O'Donell <carlos at redhat dot com> ---
Is there a publicly available standard that describes IBM extended precision
long doubles?

The smallest value I can compute is 2^(-1075):
4.94065645841246544177e-324
0x0.00000000000010000000p-1022

The smallest computed value matches the AIX expectations for the, I assume,
similar type.

I'm going to go with the smallest computed value as ulp of zero. 

Why? 

Because the first double represents the number, and if it's mantissa is zero
and the exponent is zero, then it's zero. The extra precision from the second
double is useless for subnormal values. Therefore the smallest subnormal is
identical to that for double.

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


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

* [Bug math/15536] ulp (0x0.0p0) is not FP_SUBNORMAL!
  2013-05-26  9:29 [Bug math/15536] New: ulp (0x0.0p0) is not FP_SUBNORMAL! schwab@linux-m68k.org
                   ` (2 preceding siblings ...)
  2013-05-31  5:39 ` carlos at redhat dot com
@ 2013-05-31 19:28 ` joseph at codesourcery dot com
  2013-06-03 20:23 ` carlos at redhat dot com
  2014-06-13 17:36 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: joseph at codesourcery dot com @ 2013-05-31 19:28 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Fri, 31 May 2013, carlos at redhat dot com wrote:

> Is there a publicly available standard that describes IBM extended precision
> long doubles?

libgcc/config/rs6000/ibm-ldouble-format in a GCC source tree.

> The smallest value I can compute is 2^(-1075):
> 4.94065645841246544177e-324
> 0x0.00000000000010000000p-1022

You have an off-by-one error there.  It's 0x1p-1074.

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


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

* [Bug math/15536] ulp (0x0.0p0) is not FP_SUBNORMAL!
  2013-05-26  9:29 [Bug math/15536] New: ulp (0x0.0p0) is not FP_SUBNORMAL! schwab@linux-m68k.org
                   ` (3 preceding siblings ...)
  2013-05-31 19:28 ` joseph at codesourcery dot com
@ 2013-06-03 20:23 ` carlos at redhat dot com
  2014-06-13 17:36 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: carlos at redhat dot com @ 2013-06-03 20:23 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

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

--- Comment #4 from Carlos O'Donell <carlos at redhat dot com> ---
Resolved.

commit 8b0ccb2d7fd1ec646a622a16bd64e356739ffca3
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Mon Jun 3 14:49:48 2013 -0400

    BZ #15536: Fix ulp for 128-bit IBM long double.

    In 128-bit IBM long double the precision of the type
    decreases as you approach subnormal numbers, equaling
    that of a double for subnormal numbers. Therefore
    adjust the computation in ulp to use 2^(MIN_EXP - MANT_DIG)
    which is correct for FP_SUBNORMAL for all types.

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


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

* [Bug math/15536] ulp (0x0.0p0) is not FP_SUBNORMAL!
  2013-05-26  9:29 [Bug math/15536] New: ulp (0x0.0p0) is not FP_SUBNORMAL! schwab@linux-m68k.org
                   ` (4 preceding siblings ...)
  2013-06-03 20:23 ` carlos at redhat dot com
@ 2014-06-13 17:36 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 17:36 UTC (permalink / raw)
  To: glibc-bugs

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

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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-26  9:29 [Bug math/15536] New: ulp (0x0.0p0) is not FP_SUBNORMAL! schwab@linux-m68k.org
2013-05-26  9:30 ` [Bug math/15536] " schwab@linux-m68k.org
2013-05-27 17:31 ` carlos at redhat dot com
2013-05-31  5:39 ` carlos at redhat dot com
2013-05-31 19:28 ` joseph at codesourcery dot com
2013-06-03 20:23 ` carlos at redhat dot com
2014-06-13 17:36 ` 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).