diff options
author | Andreas Enge <andreas.enge@inria.fr> | 2017-04-06 16:05:16 +0200 |
---|---|---|
committer | Andreas Enge <andreas.enge@inria.fr> | 2017-04-06 16:05:48 +0200 |
commit | f5d04977771893e941fab27b88c6aff7686df945 (patch) | |
tree | c43d93ae5fb7e07ddd45eb3dcca8705009107b32 | |
parent | e42ff90fa72e881dd5f4ab8902142d42d1bb0069 (diff) | |
download | mpc-git-f5d04977771893e941fab27b88c6aff7686df945.tar.gz |
Revert "atan: Drop assertion."
This reverts commit 5d995df9dbe0e0dbd268f5b4a821b63a3f9a90f5.
-rw-r--r-- | src/atan.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -182,6 +182,8 @@ mpc_atan (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) so we need to round down |a^2-1|, which means rounding up a^2 since |a|<1. */ mpfr_sqr (z, y, MPFR_RNDU); + /* since |y| > 1, we should have |a| <= 1, thus a^2 <= 1 */ + MPC_ASSERT(mpfr_cmp_ui (z, 1) <= 0); /* in case z=1, we should try again with more precision */ if (mpfr_cmp_ui (z, 1) == 0) continue; |