On Tue, Feb 8, 2022 at 2:41 PM Steven D'Aprano <st...@pearwood.info> wrote:

> On Mon, Feb 07, 2022 at 06:23:52PM +0000, Mark Dickinson wrote:
>
> > - Should we require IEEE 754 floating-point for
> CPython-the-implementation?
> > - Should we require IEEE 754 floating-point for Python-the-language?
>
> If the answer to those questions are Yes, that rules out using Unums,
> posits, sigmoid numbers etc as the builtin float. (The terminology is a
> bit vague, sorry.) Do we want that?
>

It does not rule anything else out should they become viable.  This is just
a statement that to build cpython we require ieee754 support.  It does not
say anything about how our Python float type is implemented internally.

Should a meaningful large-os platform come along that promotes the use of a
different format available from C we could make use of that and loosen the
policy as needed.

What updating our requirement for CPython would mean is that the likely
unexercised outside our own __set_format__ using test suite
"unknown_format" code in
https://github.com/python/cpython/blob/main/Objects/floatobject.c could go
away until such time as a platform with an actual different format springs
into existence.

Driveby floatobject.c code inspection: It is odd that we do
ieee_be/ieee_le/unknown conditionals as a runtime check rather than
configure time check as that means we compile the code for three
implementations into our float implementation on all platforms despite them
each using only one - I guess that was done for testing purposes presumably
in the 1.x era when viable platforms were weirder as standards traction
grew - today I'd call that dead code bloat.

-gps


>
> https://ieeexplore.ieee.org/document/8080000
>
> https://en.wikipedia.org/wiki/Unum_%28number_format%29
>
> https://github.com/interplanetary-robot/SigmoidNumbers
>
> Posits are hyped as "better than IEEE-754", I have no idea if it is all
> hype or if they actually are better or just different.
>
>
> --
> Steve
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/7LUAQ32ZAHKWBJHLHUYEB7I5BZNDXGB7/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/N3Z5PFOALORZ4Z7KGNSHJ7QL47D4SYRJ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to