[Python-ideas] math.inf and math.nan constants

Zachary Ware zachary.ware+pyideas at gmail.com
Mon Jan 12 21:11:41 CET 2015


On Mon, Jan 12, 2015 at 2:05 PM, Guido van Rossum <guido at python.org> wrote:
> Christian is the author of the merges for sure. Christian, do you remember
> why float.is_finite and friends are commented out, in favor of math.isnan()?

Here's the actual commit that added float.is_{nan,inf,finite}, already
commented out: http://svn.python.org/view?view=revision&revision=62380

"""
Author: christian.heimes
Date: Fri Apr 18 23:13:07 2008 UTC (6 years, 8 months ago)
Changed paths: 25
Log Message:

I finally got the time to update and merge Mark's and my trunk-math
branch. The patch is collaborated work of Mark Dickinson and me. It
was mostly done a few months ago. The patch fixes a lot of loose ends
and edge cases related to operations with NaN, INF, very small values
and complex math.

The patch also adds acosh, asinh, atanh, log1p and copysign to all
platforms. Finally it fixes differences between platforms like
different results or exceptions for edge cases. Have fun :)
"""

-- 
Zach


More information about the Python-ideas mailing list