Page MenuHomePhabricator

[APFloat] Fix IsInteger() for DoubleAPFloat

Authored by davide on Aug 21 2017, 8:15 AM.


Diff Detail


Event Timeline

davide created this revision.Aug 21 2017, 8:15 AM

Couple of notes:

  1. If nobody is using this code, we might as well consider removing it from the tree (as it seems unmaintained, and partly untested).
  2. I'm nowhere near an expert in floating point arithmetic, so the amended implementation might be wrong. Comments appreciated.
scanon accepted this revision.Aug 21 2017, 9:34 AM

This looks fine.

This revision is now accepted and ready to land.Aug 21 2017, 9:34 AM
scanon requested changes to this revision.Aug 21 2017, 9:37 AM

... except, please add another test-case where the other component is not an integer as well.

This revision now requires changes to proceed.Aug 21 2017, 9:37 AM
This revision was automatically updated to reflect the committed changes.

Thanks for your review. I added a test for the other case and committed in r311351.