On Mar 24, 8:33 am, Chris Angelico <ros...@gmail.com> wrote: > On Sun, Mar 24, 2013 at 1:19 PM, Roy Smith <r...@panix.com> wrote: > > In article <514e5f1f$0$30001$c3e8da3$54964...@news.astraweb.com>, > > Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > > >> Those who don't do serious floating point work hate NANs > > > This kind of thing doesn't just come up in floating point work. SQL > > folks have much the same issue with NULL. > > Oh, NULL is easy to deal with. It's the magic value that isn't a > value, except when it's a value, because it's the only value that you > can use when you need a value that's not a value. Of course, sometimes > it breaks that rule. > > ChrisA
Which is an elaboration of NAN: (A number that is) Not A Number. All these are different variants of ⊥ (or _|_ if that does not print) in denotational semantics. That is when a function is partial, we make it artificially total by adding an explicit bogus value to the range and mapping all undefined points to that point. The problem is that when this is carried over from partial functions to infinite program loops, it can never work (in full generality) because loops are not detectable. -- http://mail.python.org/mailman/listinfo/python-list