Author christian.heimes
Recipients christian.heimes, gvanrossum, mark
Date 2007-12-15.21:14:17
SpamBayes Score 0.242851
Marked as misclassified No
Message-id <1197753258.76.0.197473605841.issue1600@psf.upfronthosting.co.za>
In-reply-to
Content
Guido is right. On Linux the system's sprintf() family prints %e, %g and
%f with two or three digits while Windows always uses three digits:

Linux
>>> "%e" % 1e1
'1.000000e+01'
>>> "%e" % 1e10
'1.000000e+10'
>>> "%e" % 1e100
'1.000000e+100'

Windows
>>> "%e" % 1e1
'1.000000e+001'
>>> "%e" % 1e10
'1.000000e+010'
>>> "%e" % 1e100
'1.000000e+100'

The output could be changed in any of the functions:
Objects/floatobject.h:format_double()
Python/pystrtod.c:PyOS_ascii_formatd()
Python/mysnprint.c:PyOS_snprintf()
History
Date User Action Args
2007-12-15 21:14:19christian.heimessetspambayes_score: 0.242851 -> 0.242851
recipients: + christian.heimes, gvanrossum, mark
2007-12-15 21:14:18christian.heimessetspambayes_score: 0.242851 -> 0.242851
messageid: <1197753258.76.0.197473605841.issue1600@psf.upfronthosting.co.za>
2007-12-15 21:14:18christian.heimeslinkissue1600 messages
2007-12-15 21:14:17christian.heimescreate