There’s nothing in principle stopping it from inlining.
OK. Thanks!
Then I guess I’ll do something like this:
@noinline muladd_test(e) = muladd(one(e)+e,-one(e)+e,one(e)) == e*e
for T in [Float16, Float32, Float64, BigFloat]
@eval has_fast_fma(::Type{$T}) = $(muladd_test(eps(T)))
end
(But I will probably name the function muladd_is_fma
rather than has_fast_fma
as the two concepts are somewhat disjoint.)