Implementing fdim, fdimf, and fdiml for llvm-libc.
To be consistent with other places, do not put the test classes in the any namespace.
Can you move this declaration out of the method? This way, other methods can also use them without redeclarations?
We don't need these. I will clean it up in the ilogb tests.
The operation x - y can lead to overflow or underflow. Shouldn't we detect that and return the appropriate value as specified by the standard? Or, should we assume that the machine instruction does the right thing?
FPBits class cannot be constexpr yet, so we cannot have these constants as static members of the class yet. I moved them out as const members instead.
We are assuming CPU's supporting IEEE 754 arithmetic, so the machine instruction will do the right thing. For example the spec specified to return HUGE_VAL in case of overflow, which is resolved to inf for IEEE 754 standard.
SGTM. So, in general, out position is:
If we use a language operator for a floating point operation, then we assume that the machine instruction (or instructions) implementing the operator conform to the IEEE-754 standard.
Does that sound reasonable?