[Python-ideas] Way to check for floating point "closeness"?

Alan Cristhian Ruiz alan.cristh at gmail.com
Wed Jan 14 21:40:40 CET 2015

El 14/01/15 a las 17:04, Ron Adam escribió:
> which brings up the issue with 0.0 -- how many significant digits does 
> 0.0
> have? 
When a number is not expressed in scientific 
notation<http://mathworld.wolfram.com/ScientificNotation.html>, the 
amount of significant digits is infinite.

You can explicitly define the amount of significant figures in 
scientific notation. For example,
0.0000e0 contain four significant digits, 2.00 contain infinite, 
0.00300e0 contain three.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150114/91fdac13/attachment.html>

More information about the Python-ideas mailing list