This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Alpha vs EXCEPTION_TESTS
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Tue, 25 Jun 2013 20:56:06 +0000
- Subject: Re: Alpha vs EXCEPTION_TESTS
- References: <51C9DAC1 dot 7090301 at twiddle dot net>
On Tue, 25 Jun 2013, Richard Henderson wrote:
> Thus the current state of affairs wherein if one really wants
> the inexact flag to be correct throughout libm, one has to rebuild
> the library with -mieee-with-inexact set in cflags or whatever.
> (Those few files like fma for which we rely on inexact for correct
> results have individual CFLAGS-foo variables set in the Makefile.)
>
> With the recent enhancements to the testsuite, we now have
>
> > testing float (without inline functions)
> > Failure: scalbn (1, INT_MAX): Exception "Inexact" not set
>
> etc.
>
> I'm wondering if there were ideas about the best way to adjust
> the EXCEPTION_TESTS macro to filter the implemented exceptions.
I'd think the correct thing is to build more files with
-mieee-with-inexact (for those functions that are bound to IEEE
floating-point operations and for which libm-test.inc duly tests whether
the exceptions are present or absent, that is; not for the bulk of libm
where there are no requirements on whether "inexact" is raised or not ...
and if the requirement is always that no "inexact" is raised, or the
operation is always exact, of course you don't add the option).
(strtod and floating-point printf should, I think, raise "inexact" when
applicable, in addition to certain libm functions - but so far they don't
attempt to do so and there are no tests that they do.)
--
Joseph S. Myers
joseph@codesourcery.com