mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Use %.17f to format floats/doubles
This commit is contained in:
parent
bf02fb28d9
commit
104be4a4a7
1 changed files with 1 additions and 1 deletions
|
@ -922,7 +922,7 @@ save_float(Picklerobject *self, PyObject *args) {
|
|||
{
|
||||
char c_str[250];
|
||||
c_str[0] = FLOAT;
|
||||
sprintf(c_str + 1, "%f\n", x);
|
||||
sprintf(c_str + 1, "%.17g\n", x);
|
||||
|
||||
if ((*self->write_func)(self, c_str, strlen(c_str)) < 0)
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue