forked from aniani/nasm
float.c: correct the exponent
We would accidentally produce an exponent which was exactly +1 from the correct one.
This commit is contained in:
2
float.c
2
float.c
@@ -376,7 +376,7 @@ static int to_float(char *str, int32_t sign, uint8_t *result,
|
|||||||
/*
|
/*
|
||||||
* Normalised.
|
* Normalised.
|
||||||
*/
|
*/
|
||||||
exponent += expmax;
|
exponent += expmax-1;
|
||||||
ieee_shr(mant, fmt->exponent);
|
ieee_shr(mant, fmt->exponent);
|
||||||
ieee_round(mant, fmt->words);
|
ieee_round(mant, fmt->words);
|
||||||
/* did we scale up by one? */
|
/* did we scale up by one? */
|
||||||
|
Reference in New Issue
Block a user