Add more real formatting tests

See #61
This commit is contained in:
Justine Tunney 2021-03-06 08:45:44 -08:00
parent 6fa049c9c7
commit cfd453d125
5 changed files with 283 additions and 134 deletions

View file

@ -168,9 +168,9 @@ dtoa(double d0, int mode, int ndigits, int *decpt, int *sign, char **rve)
*decpt = 9999;
#ifdef IEEE_Arith
if (!word1(&d) && !(word0(&d) & 0xfffff))
return nrv_alloc("inf", rve, 8 MTb);
return nrv_alloc("Infinity", rve, 8 MTb);
#endif
return nrv_alloc("nan", rve, 3 MTb);
return nrv_alloc("NaN", rve, 3 MTb);
}
#endif
#ifdef IBM