Bugs item #1088563, was opened at 2004-12-20 13:29 Message generated for change (Comment added) made by tim_one You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1088563&group_id=5470
Category: Macintosh >Group: Not a Bug >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: Sebastian Rockel (buzz42) Assigned to: Jack Jansen (jackjansen) Summary: calculation wrong rounding Initial Comment: I am using python 2.4 on MAC OS 10.3.7 with gcc V3.3 20030304 (Apple Computer, Inc. build 1666) It is a simple calculation. There seems to be a little rounding problem: >>> 4053020.7+10*324241.6 7295436.7000000002 It shoult be of course 7295436.7 ---------------------------------------------------------------------- >Comment By: Tim Peters (tim_one) Date: 2004-12-20 14:09 Message: Logged In: YES user_id=31435 Please read the Appendix about floating-point issues in the Python Tutorial -- what you're seeing is an unavoidable consquence of using binary floating-point hardware. If you require exact decimal representations, use the new ``decimal`` module intead. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1088563&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com