This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] Add powf bench tests
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Paul Clarke <pc at us dot ibm dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Mon, 12 Jun 2017 20:28:26 +0000
- Subject: Re: [PATCH v2] Add powf bench tests
- Authentication-results: sourceware.org; auth=none
- References: <d50b8d5e-b53b-3bd5-35ae-c33f6a0793ad@us.ibm.com>
On Mon, 12 Jun 2017, Paul Clarke wrote:
> +## name: negative base to even exponent
> +-0x1.fffffep+127, -0x1.8p+3
> +-0x1.fffffep+127, -0x1.cccccep+2
> +-0x1.fffffep+127, -0x1.33333p+1
> +-0x1.fffffep+127, 0x1.333338p+1
> +-0x1.fffffep+127, 0x1.ccccdp+2
Many of these are obviously not integer exponents.
> +## name: negative base to odd exponent
> +-0x1.fffffep+127, -0x1.6p+3
> +-0x1.fffffep+127, -0x1.8cccccp+2
> +-0x1.fffffep+127, -0x1.66666p+0
> +-0x1.fffffep+127, 0x1.b33338p+1
> +-0x1.fffffep+127, 0x1.066668p+3
Likewise.
I don't actually think the cases with NaN results (and other special
cases) are particularly interesting for benchmarking; they're thoroughly
covered in the tests of correctness, but if NaN results are common enough
in your application that it's worth optimizing for that case, there's
something wrong with your application. That is, there should be a lot
more of the ordinary cases (ones where powf actually has to compute a log
and do exponentiation) in the benchmark than of the special cases.
--
Joseph S. Myers
joseph@codesourcery.com