On Mon, 12 Oct 2020 at 07:23, Christopher Barker <python...@gmail.com> wrote:
>
> FWIW, if a change were to be made, I'd rather it be some kind of float error 
> handling context: either a global setting, like numpy's, or a context 
> manager. With, of course, the default behavior just like it's been forever.

You can have both a global setting and then a context manager for
altering it, although it would need to be thread-safe. I would
certainly make use of an option to have exceptions instead of nans.

I did suggest something similar at some point and was pointed to fpectl:
https://docs.python.org/2/library/fpectl.html
I haven't looked in any detail but I suspect that making fpectl work
on all platforms is not really viable: this should probably be handled
within the interpreter rather than at the FPU level (although that
could be used as an optimisation for some platforms).

--
Oscar
_______________________________________________
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/FXXAVPHVP56UG7PUWO4ZWF32Q36KPWHQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to