public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: Yu-Chien Peter Lin <peterlin@andestech.com>
Cc: <libc-help@sourceware.org>, ycliang@andestech.com
Subject: Re: math tests failed when the argument is out of domain
Date: Thu, 13 Oct 2022 10:24:59 +0100	[thread overview]
Message-ID: <Y0fZa2vZ0nagtwL6@arm.com> (raw)
In-Reply-To: <Y0XRMkSVxUQxG91o@APC323>

The 10/11/2022 20:25, Yu-Chien Peter Lin wrote:
> Hi all, 
> 
> We run the glibc testsuite on RISC-V targets and got some 
> common failure of following test in math subdir. 
> 
> FAIL: math/test-double-acos
> FAIL: math/test-double-asin
> FAIL: math/test-float64-acos
> FAIL: math/test-float64-asin
> FAIL: math/test-float32x-acos
> FAIL: math/test-float32x-asin
> 
> The return values and errno of acos and asin are correct, but
> they don't raise "Invalid operation" exception when the argument
> is inf, -inf, 1.125, -1.125, max_value and -max_value.


fwiw i saw this on aarch64 with some version of gcc-10 when
'return INFINITY/INFINITY;' is optimized to 'return NAN;'
so the fenv exception is not set.

this could be fixed via a more robust arithmetic to set nan
e.g. (x-x)/(x-x) or ensuring gcc takes exceptions into account
when const folding float operations.

> 
> These failed cases are listed test results [1] since glibc 2.33,
> but it seems not a reported bug on sourceware bugzilla. so I want
> to know the status on this issue.
> 
> [1] https://sourceware.org/glibc/wiki/Release/2.35#RISC-V_.28rv64imafdc.2Flp64d.29
> 
> These tests run at below environments.
> - glibc 2.35
> - gcc 10.2.1
> - binutils 2.38
> - Linux 5.4
> 
> Best Regards,
> Peter Lin

  reply	other threads:[~2022-10-13  9:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 20:25 Yu-Chien Peter Lin
2022-10-13  9:24 ` Szabolcs Nagy [this message]
2022-10-16 11:08   ` Yu-Chien Peter Lin

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=Y0fZa2vZ0nagtwL6@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=libc-help@sourceware.org \
    --cc=peterlin@andestech.com \
    --cc=ycliang@andestech.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).