On Tue, Feb 16, 2010 at 10:46 PM, Steven D'Aprano <st...@pearwood.info>
> What's the justification for that convention? It seems wrong to me. It's difficult to do better than to point to Kahan's writings. See http://www.eecs.berkeley.edu/~wkahan/ieee754status/IEEE754.PDF and particularly the discussion on page 8 that starts "Were there no way to get rid of NaNs ...". I don't think it covers hypot, but the same justification given for having nan**0 == 1 applies here. Interestingly, he says that at the time of writing, 1**nan == nan is the preferred alternative. But since then, the standards (well, at least C99 and IEEE 754-2008) have come out in favour of 1**nan == 1. Mark _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com