[issue37474] Should Py_Initialize() control the floating point mode?

Mark Dickinson report at bugs.python.org
Wed Jul 3 08:43:33 EDT 2019


Mark Dickinson <dickinsm at gmail.com> added the comment:

> What is the behavior on FreeBSD when fedisableexcept(FE_OVERFLOW) is not called?

That's an excellent question, that I'd love to have an answer to for currently supported FreeBSD versions.

I think the old behaviour is that anything that you'd expect to raise an FPE (e.g., `math.sqrt(-1.0)` would segfault the interpreter). It may be that that's no longer an issue with FreeBSD versions that we care about.

That code comment dates from over 16 years ago (see https://github.com/python/cpython/commit/4643bd9a9cf43332992d10982c52debf3f0d980c), so there's some hope that the situation's changed since then.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37474>
_______________________________________


More information about the Python-bugs-list mailing list