public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <josmyers@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org, "H . J . Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH v2 00/10] Improve rounding to interger function for C23
Date: Wed, 3 Apr 2024 15:03:11 +0000 (UTC)	[thread overview]
Message-ID: <b5862d50-7ec-cec1-8998-3d8a8a7c9d4@redhat.com> (raw)
In-Reply-To: <20240403121150.1018799-1-adhemerval.zanella@linaro.org>

On Wed, 3 Apr 2024, Adhemerval Zanella wrote:

> As indicated by GCC documentation [1], ISO C23 does not allow that C
> bindings ceil, floor, round, and trunc (in all floating point formats)
> to raise inexact exceptions (different than ISO C99/C11 where this is
> allowed).
> 
> A recent MIPS patch to used some arch-specific instructions raised this
> issue [1] and it was not caught because there was no proper testing. By
> adding the missing tests, some implementations do indeed raise inexact
> exceptions. 

There is testing that, in the terminology used by IEEE 754, the operations 
do not raise the exception flag (the result of default exception handling 
when the exception is signaled).  This is done through 
NO_INEXACT_EXCEPTION in libm-test-*.inc.

What is not tested is specifically quality of implementation when 
exception traps are enabled (a GNU extension outside the scope of the C 
standard).

I think that as a user-visible fix, there should be a bug filed in 
Bugzilla for this issue (that can then be marked FIXED so it goes in the 
automatically generated list of bugs fixed in the next release).

-- 
Joseph S. Myers
josmyers@redhat.com


  parent reply	other threads:[~2024-04-03 15:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 12:11 Adhemerval Zanella
2024-04-03 12:11 ` [PATCH v2 01/10] math: Add test to check if ceil raise inexact floating-point exception Adhemerval Zanella
2024-04-03 12:54   ` H.J. Lu
2024-04-03 12:11 ` [PATCH v2 02/10] math: Add test to check if floor " Adhemerval Zanella
2024-04-03 12:55   ` H.J. Lu
2024-04-03 12:11 ` [PATCH v2 03/10] math: Add test to check if trunc " Adhemerval Zanella
2024-04-03 12:55   ` H.J. Lu
2024-04-03 12:11 ` [PATCH v2 04/10] math: Add test to check if round " Adhemerval Zanella
2024-04-03 12:56   ` H.J. Lu
2024-04-03 12:11 ` [PATCH v2 05/10] x86: Do not raise inexact exception on ceill Adhemerval Zanella
2024-04-03 13:04   ` H.J. Lu
2024-04-03 13:15     ` Adhemerval Zanella Netto
2024-04-03 13:28       ` H.J. Lu
2024-04-03 12:11 ` [PATCH v2 06/10] x86: Do not raise inexact exception on floorl Adhemerval Zanella
2024-04-03 12:11 ` [PATCH v2 07/10] x86: Do not raise inexact exception on truncl Adhemerval Zanella
2024-04-03 12:11 ` [PATCH v2 08/10] x86: Do not raise inexact exception on floor/floorf Adhemerval Zanella
2024-04-03 12:11 ` [PATCH v2 09/10] i386: Do not raise inexact exception on ceil/ceilf Adhemerval Zanella
2024-04-03 12:11 ` [PATCH v2 10/10] i386: Do not raise inexact exception on trunc/truncf Adhemerval Zanella
2024-04-03 15:03 ` Joseph Myers [this message]
2024-04-03 17:10   ` [PATCH v2 00/10] Improve rounding to interger function for C23 Adhemerval Zanella Netto
2024-04-04  5:25     ` Paul Zimmermann

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=b5862d50-7ec-cec1-8998-3d8a8a7c9d4@redhat.com \
    --to=josmyers@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /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).