Infinity

Mick vsl6 at paradise.net.nz
Wed May 9 20:10:28 EDT 2001


Is there an Infinity object in Python 2.1?  I used to produce one in 1.5.2
using Inf = math.exp(10000), but now I just get an overflow error.  It is
very convenient to have an Inf object that allows comparison and arithmetic
operations.  Eg : it is useful to say Inf - x = Inf.  Simply using a very
large number is not very useful as Inf - x != Inf.  It is simply to write
such an object, but its apparent non-existence as part of the math module
made me think there was something philosophically wrong in making one.

thanks
Mick





More information about the Python-list mailing list