summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-04-03 21:13:02 (GMT)
committerGuido van Rossum <guido@python.org>1998-04-03 21:13:02 (GMT)
commit104be4a4a797bfc6f8982c81839736083fa54fac (patch)
tree9894cc74166873379f033ac4e7664d37005271d7 /Modules
parentbf02fb28d9f9c6b28c1bf7be56ce87924f5742dd (diff)
downloadcpython-104be4a4a797bfc6f8982c81839736083fa54fac.zip
cpython-104be4a4a797bfc6f8982c81839736083fa54fac.tar.gz
cpython-104be4a4a797bfc6f8982c81839736083fa54fac.tar.bz2
Use %.17f to format floats/doubles
Diffstat (limited to 'Modules')
-rw-r--r--Modules/cPickle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index db72bf9..9af979b 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -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;