In older toolchains, Float16 is marked unavailable on all mac targets; starting with the 5.4 toolchain, it is available starting in macOS 11.0 when targeting Apple Silicon.
This is kind of dubious, but necessary for performance reasons until we get dependable cross-module specialization. Also has a minor test fix for 32b platforms.
These cases expose a bug in the current implementation; because the split of the exponent into high and low parts may produce numbers with different signs, if both parts overflow or underflow, we can end up with 0 * infinity = NaN, when the result should actually be either zero or infinity.
These cases expose a bug in the current implementation; because the split of the exponent into high and low parts may produce numbers with different signs, if both parts overflow or underflow, we can end up with 0 * infinity = NaN, when the result should actually be either zero or infinity.
Redesign and rename sanityCheck to assertClose; basic function is the same, but the implementation is a bit more straightforward and it now reports an accurate ulp error and can track maximum error if you want (we want this for some use cases).
Also move the basic sanity checks into one file and the tests that more thoroughly excercise a single function into their own files.