This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author falk_steinhauer
Recipients falk_steinhauer
Date 2007-12-24.11:53:14
SpamBayes Score 0.10808615
Marked as misclassified No
Message-id <1198497194.94.0.235082191295.issue1694@psf.upfronthosting.co.za>
In-reply-to
Content
[Bernhard@localhost ~]$ python
Python 2.5.1 (r251:54863, Oct 30 2007, 13:54:11)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> f1=0.55
>>> f2=2.25
>>> print '%.1f, %.1f' % (f1, f2)
0.6, 2.2
>>>
 
f1 is rounded to the next higher value, but f2 is not.


C:\>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> f1=0.55
>>> f2=2.25
>>> print '%.1f, %.1f' % (f1, f2)
0.6, 2.3
>>>

Under windows it works properly.


If the floating point numbers are encapsulated behind "round(f, 1)" 
both OS show the same output.
History
Date User Action Args
2007-12-24 11:53:15falk_steinhauersetspambayes_score: 0.108086 -> 0.10808615
recipients: + falk_steinhauer
2007-12-24 11:53:14falk_steinhauersetspambayes_score: 0.108086 -> 0.108086
messageid: <1198497194.94.0.235082191295.issue1694@psf.upfronthosting.co.za>
2007-12-24 11:53:14falk_steinhauerlinkissue1694 messages
2007-12-24 11:53:14falk_steinhauercreate