[PATCH v2 3/5] math: Improve fmod

Wilco Dijkstra Wilco.Dijkstra@arm.com
Fri Mar 17 18:22:40 GMT 2023


Hi HJ,

>> Also I think your results for generic above use the wrapper, so we'd still get the
>> > 20% speedup which should make things closer.
>
>
> The current __ieee754_fmod doesn't set errno nor does x87 __ieee754_fmod.
> A wrapper will avoid setting errno.

The new generic fmod removes the wrapper since it sets errno when needed -
ie. the wrapper is unnecessary overhead. We must keep using the wrapper in
implementations that don't set errno of course.

Applications never call __ieee754_fmod, so the right comparison is between
the generic fmod without the wrapper and the x87 fmod with the wrapper.

Cheers,
Wilco


More information about the Libc-alpha mailing list