2009/6/23 Alan Gauld <alan.gauld at btinternet.com>: > Interesting! How is a NaN stored in Python? > ie. How do you get to the point of having one in the first place? Well, you can do this: >>> float('nan') nan (try float('inf') too) -- John.