[PATCH v2 4/6] x86-64: Add vector log/logf to libmvec microbenchmark

Joseph Myers joseph@codesourcery.com
Tue Nov 16 00:12:28 GMT 2021


On Fri, 12 Nov 2021, Sunil Pandey via Libc-alpha wrote:

> Can you please provide some suggestions on input range, if it looks OK or
> it should be changed to some specific value to make it fair for different
> implementations.
> 
> cos/cosf: Random inputs in [a=-100.00,b=100.00]
> sin/sinf: Random inputs in [a=-100.00,b=100.00]

My guess is that most inputs are actually in say [-10, 10], but [-100, 
100] seems reasonable as limits on what values are benchmarked at all.

> exp/expf: Random inputs in [a=-10.00,b=50.00]

I suggest a roughly symmetric range (lower limit being a bit above what 
would cause a subnormal result, upper limit being a bit below what would 
overflow - note that means different limits for exp and expf).

> log/logf: Random inputs in [a=1.10,b=100.00]

I suggest a lower limit of 0 and an upper limit of FLT_MAX / DBL_MAX (note 
this means different limits for log and logf), but with a substantial 
proportion of inputs being closer to 1 (say in the range [0.01, 100]).

> pow/powf: Random inputs in [a=0.01,b=100.00], [c=0.01,d=10.00]

I think negative exponents should be included, about as many as positive 
exponents (similar range, so that results are neither subnormal nor 
overflowing).

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Libc-alpha mailing list