What's the best way to portably generate binary floating point infinity and NaNs? I only know two solutions:
1. Using the fpconst module proposed in IEEE 754, which I believe shifts bits around. 2. Using an extension module (for example, numarray.ieeespecial will do it). I thought of using float(Decimal("nan")), but apparently Decimal.__float__(self) is float(str(self)), which isn't portable. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list