summaryrefslogtreecommitdiff
path: root/src/neg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/neg.c')
-rw-r--r--src/neg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/neg.c b/src/neg.c
index 7e8fff8b9..d5f87aa20 100644
--- a/src/neg.c
+++ b/src/neg.c
@@ -29,6 +29,7 @@ mpfr_neg (mpfr_ptr a, mpfr_srcptr b, mpfr_rnd_t rnd_mode)
return mpfr_set4 (a, b, rnd_mode, -MPFR_SIGN(b));
else if (MPFR_UNLIKELY(MPFR_IS_NAN (b)))
{
+ MPFR_SET_OPPOSITE_SIGN(a,b);
MPFR_RET_NAN;
}
else