[PATCH v2] Add powf bench tests
Joseph Myers
joseph@codesourcery.com
Mon Jun 12 20:28:00 GMT 2017
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
More information about the Libc-alpha
mailing list