A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/085647.html below:

newbie seeks inaccurate arithmetic insight

newbie seeks inaccurate arithmetic insight newbie seeks inaccurate arithmetic insightFredrik Lundh fredrik at pythonware.com
Mon Apr 30 11:41:04 EDT 2001
Stanley Krute wrote:
> Hmmm. Here's a corresponding c program
>
>     http://static.userland.com/images/stanleydaily/carithmeticprogram.gif

try using "%.17g" (show all significant digits) instead of "%f" (fudge it)

...or use "print" in Python, to get str() instead of repr() behaviour:

>>> 0.1
0.10000000000000001
>>> print 0.1
0.1

Cheers /F



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4