public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* test-misc is failing for powerpc32/64
@ 2007-05-22 18:32 Steven Munroe
  0 siblings, 0 replies; only message in thread
From: Steven Munroe @ 2007-05-22 18:32 UTC (permalink / raw)
  To: Jakub Jelinek, GNU libc hacker

Jakub your change:

2007-05-03  Jakub Jelinek  <jakub@redhat.com>

    * soft-fp/op-common.h (FP_TRUNC): Replace raising of FP_EX_INEXACT
    with setting the sticky bit.
    * math/test-misc.c (main): Add more truncation tests.

Is causing failures on powerpc. The denomal rounding test you added
assume that __LDBL_DENORM_MIN__ is less than __DBL_DENORM_MIN__ by at
least 4 bits which is not true for IBM128 long double.

#define __DBL_DENORM_MIN__   4.9406564584124654e-324
#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L

This is implicit in the statement:

    volatile long double ld5 = nextafter (0.0, 1.0) / 16.0L;

This will always return 0.0L for IBM128.

So we could just disable this part of the test for IBM128 with for example

   #if LDBL_MANT_DIG != 106

or replace each usage of  "nextafter (0.0, 1.0)" with LDBL_MIN

#define __LDBL_MIN__ 2.00416836000897277799610805135016e-292L

In IBM128 LDBL_MIN is the where the low order double can be subnormal
but as the high and low double can not overlap, the high order double
must be >= 0x1.0p-969


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-22 18:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-22 18:32 test-misc is failing for powerpc32/64 Steven Munroe

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