mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
using 16 decimal places of precision in number->string (issue #433)
This commit is contained in:
parent
7114148121
commit
8470534c39
1 changed files with 1 additions and 1 deletions
2
sexp.c
2
sexp.c
|
@ -1913,7 +1913,7 @@ sexp sexp_write_one (sexp ctx, sexp obj, sexp out) {
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
i = snprintf(numbuf, NUMBUF_LEN, "%.15g", f);
|
i = snprintf(numbuf, NUMBUF_LEN, "%.16g", f);
|
||||||
if (!strchr(numbuf, '.') && !strchr(numbuf, 'e')) {
|
if (!strchr(numbuf, '.') && !strchr(numbuf, 'e')) {
|
||||||
numbuf[i++] = '.'; numbuf[i++] = '0'; numbuf[i++] = '\0';
|
numbuf[i++] = '.'; numbuf[i++] = '0'; numbuf[i++] = '\0';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue