float.c: correct the exponent
We would accidentally produce an exponent which was exactly +1 from the correct one.
This commit is contained in:
parent
b8e604eb5d
commit
cdb227fa71
1 changed files with 1 additions and 1 deletions
2
float.c
2
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? */
|
||||
|
|
Loading…
Reference in a new issue