where in Nan defined

Chris Angelico rosuav at gmail.com
Fri Jan 9 03:25:42 CET 2015


On Fri, Jan 9, 2015 at 1:12 PM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> Or to never have to worry about it:
>
> INF = 1e400
> while not math.isinf(INF):
>     INF *= INF

With no imports whatsoever:

inf = 1e400
nan = inf-inf
while nan == nan:
    inf *= inf
    nan = inf-inf

But now we're getting stupid :)

ChrisA



More information about the Python-list mailing list