[PATCH] math: Add a no-mathvec flag for sin (-0.0)

Wilco Dijkstra Wilco.Dijkstra@arm.com
Wed Aug 16 12:58:46 GMT 2023


Hi Paul,

> I don't understand the purpose of this new no-mathvec flag.
> Are vector math libraries allowed to return anything else
> than -0 for sin(-0)?
>
> If so, why would it be different in scalar (non vector) mode?

Vector math libraries are only used with -Ofast since they have
much higher ULP errors, create spurious exceptions etc. -Ofast
ignores sign of zero, and doesn't support NaNs. In this case the
vector sin (-0.0) returned +0.0 (no ULP error), so we skip this test.

Cheers,
Wilco



More information about the Libc-alpha mailing list