6 Jul
2020
6 Jul
'20
12:54 a.m.
On Sun, Jul 05, 2020 at 12:15:27PM -0400, David Mertz wrote:
This is a digression, but does anyone have a nice example IN PYTHON of arriving at a NaN without going through infinity. I think Julia is right and Python is wrong about '0/0', but as things are, that's not an example.
I wouldn't expect one in Python, I think there is an unofficial policy of ensuring that Python builtins and the math library will not return NANs unless passed a NAN, or at least an INF, rather they will raise. Chris' example:
1e1000-1e1000 nan
is just a funny way of writing INF - INF :-) -- Steven