Fix IEEEFloat::remainder() function.
Fix PR3359.
Differential D69776
[APFloat] Fix FP remainder operation ekatz on Nov 3 2019, 1:02 PM. Authored by
Details
Diff Detail Event TimelineComment Actions Thanks for posting patches to fix problems with the APFloat implementation. FWIW, this code is hard to review, from my perspective, because it lacks comments (both your new code and the code it is replacing). As you clearly have gone through this and understand what it's doing, could you add a bunch of comments explaining what's going on? I think that would be very helpful for everyone else.
Comment Actions I'd like to see more test coverage for denormal denominators, and denominators close to the max finite float.
|
The opDivByZero thing is sort of confusing. Maybe just something like if (!isFinite() || !rhs.isFinite()) return remainderSpecials(rhs);?