summaryrefslogtreecommitdiff
path: root/float.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-04 22:51:08 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-10-04 22:51:08 -0700
commitcdb227fa71be498e5c86ee4fd2ce35193ef28bf9 (patch)
tree414dd391e8e4acb86419815293b16885cb4b8128 /float.c
parentb8e604eb5d397a956ec370da5ee47368a847e367 (diff)
downloadnasm-cdb227fa71be498e5c86ee4fd2ce35193ef28bf9.tar.gz
nasm-cdb227fa71be498e5c86ee4fd2ce35193ef28bf9.tar.bz2
nasm-cdb227fa71be498e5c86ee4fd2ce35193ef28bf9.zip
float.c: correct the exponent
We would accidentally produce an exponent which was exactly +1 from the correct one.
Diffstat (limited to 'float.c')
-rw-r--r--float.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/float.c b/float.c
index 64a77b8..c612689 100644
--- a/float.c
+++ b/float.c
@@ -376,7 +376,7 @@ static int to_float(char *str, int32_t sign, uint8_t *result,
/*
* Normalised.
*/
- exponent += expmax;
+ exponent += expmax-1;
ieee_shr(mant, fmt->exponent);
ieee_round(mant, fmt->words);
/* did we scale up by one? */