different results for expf on x86_64

Joseph Myers joseph@codesourcery.com
Thu Feb 6 21:06:00 GMT 2020


On Tue, 4 Feb 2020, Wilco Dijkstra wrote:

> In this particular case x86_64 uses the generic math code, but compiles expf
> with and without FMA. FMA causes minor rounding differences, but this is fine
> since the new math functions have been designed to be used with FMA (AArch64
> uses FMA by default so there is only one version).

Furthermore, you can get different results with different GCC versions (or 
optimzation options) used to build glibc that is then run on the same 
processor, because the compilers may make different choices about whether 
to contract operations that were written as a*b+c to use FMA.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list