summaryrefslogtreecommitdiff
path: root/src/set_d.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-01-18 00:55:24 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-01-18 00:55:24 +0000
commit96d228cac6ce4137bf04d27ac3ce57a88f52426c (patch)
tree186937be92de5abd6784da53b4078b9cc73dccb1 /src/set_d.c
parent3eb6e2b66cac7c7f3d293dbdea7f3a6c96f67e1a (diff)
downloadmpfr-96d228cac6ce4137bf04d27ac3ce57a88f52426c.tar.gz
[src/set_d.c] In extract_double, replaced long by int for exp (it may be
faster, and shouldn't be slower as it is more restrictive than long). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8780 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/set_d.c')
-rw-r--r--src/set_d.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/set_d.c b/src/set_d.c
index b45b01135..3cf37f8d0 100644
--- a/src/set_d.c
+++ b/src/set_d.c
@@ -27,11 +27,13 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
#include "mpfr-impl.h"
/* extracts the bits of d in rp[0..n-1] where n=ceil(53/GMP_NUMB_BITS).
- Assumes d finite and > 0. */
-static long
+ Assumes d finite and > 0.
+ The int type should be sufficient for exp.
+*/
+static int
extract_double (mpfr_limb_ptr rp, double d)
{
- long exp;
+ int exp;
mp_limb_t manl;
#if GMP_NUMB_BITS == 32
mp_limb_t manh;