Rich Felker wrote: > > > So isnanl is expected to be slower in every program that's using it > > > for legitimate arithmetic purposes > > > > Yes. But it will not be slower by much. The CPUs have an instruction for > > 'fpclassify'; you just need to pass the right bitmask to that instruction. > > Are you sure that's faster than avoiding loading the value into the > fpu at all and doing integer arithmetic/bit tests? I have my doubts.
Maybe integer arithmetic is faster than the 'fpclassify' instruction. Either way, an isnanl() implementation can be written that is not terribly expensive. Bruno