These implement the usual IEEE-style floating point comparison
semantics, e.g. +0.0 == -0.0 and all operators except != return false
if either argument is NaN.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/unittests/ADT/APFloatTest.cpp | ||
---|---|---|
4273–4274 | This should probably be as before, with separate tests for the full range of operators |
I like this change!
However, I think (as @arsenm) that the tests shouldn't be changed, but add separate new ones for the newly overloaded operators.
Generally it LGTM.
But this change may be split into 2 as well (like the neg change).
I know that some times you see patches that change and add a lot of code (in the same patch), while in other cases they split into smaller ones. Both approaches are valid, but I think the better one is to split (if possible); especially in cases (like this) that change apply to files, from separate projects/modules, outside the one in which the new API is added.
So, I suggest split it into 2, where one adds the new operators and tests; and the other changes the compares in the different locations.
clang-format: please reformat the code