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.
On Sun, Jul 5, 2020, 12:05 PM Chris Angelico <ros...@gmail.com> wrote: > On Mon, Jul 6, 2020 at 1:58 AM Steven D'Aprano <st...@pearwood.info> > wrote: > > Python makes it quite hard to get a NAN from the builtins, but other > > languuages do not. Here's Julia: > > > > julia> 0/0 > > NaN > > > > So there's at least one NAN which means *there is no correct answer*. > > >>> 1e1000-1e1000 > nan > > ChrisA > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/TDIWUV4DCURDEKFMFVY2YZZWQ6ODWOFP/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/NZNMC3KSCKMBGIHXDJZPE5T4RI3TO3CE/ Code of Conduct: http://python.org/psf/codeofconduct/