summaryrefslogtreecommitdiff
path: root/sub_ui.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-07-25 15:43:49 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-07-25 15:43:49 +0000
commit609684b566743c6a0426b3190736a1fd7568a864 (patch)
tree6d156cd58d229541f586d1f795e32e40ea987fef /sub_ui.c
parent55f6a6d0a69136d56f30a6da63d5a539320b9d53 (diff)
downloadmpfr-609684b566743c6a0426b3190736a1fd7568a864.tar.gz
Function mpfr_check_range now propagates the inexact ternary value.
Function mpfr_restore_emin_emax OR's the saved flags with the current flags, as this is more useful in general. Macro MPFR_RESTORE_RET removed (no longer useful). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1999 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sub_ui.c')
-rw-r--r--sub_ui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sub_ui.c b/sub_ui.c
index 541c4af6b..497a50014 100644
--- a/sub_ui.c
+++ b/sub_ui.c
@@ -45,7 +45,8 @@ mpfr_sub_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode)
if mpfr_sub works even when uu is out-of-range. */
mpfr_save_emin_emax();
inex = mpfr_sub(y, x, uu, rnd_mode);
- MPFR_RESTORE_RET(inex, y, rnd_mode);
+ mpfr_restore_emin_emax();
+ return mpfr_check_range(y, inex, rnd_mode);
}
else
return mpfr_set (y, x, rnd_mode);