public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Steven Munroe <munroesj@us.ibm.com>
To: Jakub Jelinek <jakub@redhat.com>,
	GNU libc hacker <libc-hacker@sources.redhat.com>
Subject: test-misc is failing for powerpc32/64
Date: Tue, 22 May 2007 18:32:00 -0000	[thread overview]
Message-ID: <46533BA6.9010304@us.ibm.com> (raw)

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


                 reply	other threads:[~2007-05-22 18:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46533BA6.9010304@us.ibm.com \
    --to=munroesj@us.ibm.com \
    --cc=jakub@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).