[PATCH v2 06/25] benchtests: Add atan2f benchmark

DJ Delorie dj@redhat.com
Sat Dec 7 00:46:19 GMT 2024


Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> Random inputs in the range [-10,10].

LGTM
Reviewed-by: DJ Delorie <dj@redhat.com>

> diff --git a/benchtests/Makefile b/benchtests/Makefile
> index 143d6c2bbf..29e287f220 100644
> --- a/benchtests/Makefile
> +++ b/benchtests/Makefile
> @@ -34,6 +34,7 @@ bench-math := \
>    asinhf \
>    atan \
>    atan2 \
> +  atan2f \
>    atanf \

Ok.

> diff --git a/benchtests/atan2f-inputs b/benchtests/atan2f-inputs
> new file mode 100644
> index 0000000000..0e66925b1e
> --- /dev/null
> +++ b/benchtests/atan2f-inputs
> @@ -0,0 +1,2005 @@
> +## args: float:float
> +## ret: float
> +## includes: math.h
> +# Random x,y inputs in the range [-10,10]
> +## name: workload-random

Ok.

> +0x1.663bap+2, 0x1.b2403p+2
> +0x1.44dcb4p+2, -0x1.9a01p+2
> +0x1.644ffp+1, 0x1.eb4138p+2
> . . .
> +0x1.f5a278p+2, 0x1.92b2a8p+2
> +0x1.6bd6p-3, 0x1.2bbf5cp+3
> +-0x1.1e3edcp+2, -0x1.41af8p+0

The data happens to not have Y zeros in it, but that might be by chance.
A comment about Y=0 cases might be appropriate although I doubt anyone
would ever read it.



More information about the Libc-alpha mailing list