[PATCH] D39225: Fix APFloat mod sign

Steve Canon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 09:32:17 PDT 2017


scanon accepted this revision.
scanon added a comment.
This revision is now accepted and ready to land.

`mod` is not bound to the IEEE 754 remainder operation. It binds the C `fmod` operation. You're looking for the `remainder` operation.

However, `fmod` has the same requirement: "The fmod functions return the value x − ny, for some integer n such that, if y is nonzero, the result has the same sign as x and magnitude less than the magnitude of y."


https://reviews.llvm.org/D39225





More information about the llvm-commits mailing list