[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-24 Thread Victor Stinner
The consensus is to require IEEE 754 to build CPython, but not require it in the Python language specification. Updates (changed merged in bpo-46656): * Building Python 3.11 now requires a C11 compiler without optional C11 features. I wrote it in What's New in Python 3.11 and the PEP 7. * Buildin

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-09 Thread Brett Cannon
On Tue, Feb 8, 2022 at 10:20 PM Steven D'Aprano wrote: > On Tue, Feb 08, 2022 at 05:48:46PM -0800, Gregory P. Smith wrote: > > On Tue, Feb 8, 2022 at 2:41 PM Steven D'Aprano > wrote: > > > > If the answer to those questions are Yes, that rules out using Unums, > > > posits, sigmoid numbers etc a

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-09 Thread Jim J. Jewett
I think you skimmed over "A floating point expert can probably look at this ... " I remember a time when I just assumed more bits was better, and a later time when I figured smaller was better, and a still later time when I wanted to match the published requirements for bitsize. So that was se

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-09 Thread Steve Dower
On 2/8/2022 9:54 PM, Steven D'Aprano wrote: Regarding your second point, about domain-specific tasks, I don't understand. If your domain-specific task doesn't need to use floats, just don't use floats. There's surely no need to invent a whole new language for some task because your app only needs

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-08 Thread Steven D'Aprano
On Tue, Feb 08, 2022 at 05:48:46PM -0800, Gregory P. Smith wrote: > On Tue, Feb 8, 2022 at 2:41 PM Steven D'Aprano wrote: > > 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

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-08 Thread Gregory P. Smith
On Tue, Feb 8, 2022 at 2:41 PM Steven D'Aprano wrote: > On Mon, Feb 07, 2022 at 06:23:52PM +, 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

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-08 Thread Gregory P. Smith
On Tue, Feb 8, 2022 at 2:25 PM Steven D'Aprano wrote: > On Mon, Feb 07, 2022 at 05:35:17PM -0800, Gregory P. Smith wrote: > > > CPython: yes. we use a double. > > Python the language: no. (float is single precision on many micropython > > platforms as it saves precious ram and performance, plus

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-08 Thread Antoine Pitrou
On Tue, 08 Feb 2022 01:12:22 - "Jim J. Jewett" wrote: > - Should we require the presence of NaNs in order for CPython to build? > - Should we require IEEE 754 floating-point for CPython-the-implementation? > - Should we require IEEE 754 floating-point for Python-the-language? > > I don't have

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-08 Thread Steven D'Aprano
On Mon, Feb 07, 2022 at 06:23:52PM +, 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, sigmo

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-08 Thread Steven D'Aprano
On Mon, Feb 07, 2022 at 05:35:17PM -0800, Gregory P. Smith wrote: > CPython: yes. we use a double. > Python the language: no. (float is single precision on many micropython > platforms as it saves precious ram and performance, plus microcontroller > fpu hardware like an M4 is usually single prec

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-08 Thread Steven D'Aprano
On Tue, Feb 08, 2022 at 12:44:46PM +, Steve Dower wrote: > Agreed. CPython should be specific, Python should be as vague as > possible. Otherwise, we would prevent _by specification_ using Python as > a scripting language for things where floats may not even be relevant. I don't think that

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-08 Thread Steve Dower
On 2/8/2022 1:35 AM, Gregory P. Smith wrote: While we're at it are  64 bit floats required for either cPython or Python the language? CPython: yes.  we use a double. Python the language: no.  (float is single precision on many micropython platforms as it saves precious ram and performa

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-07 Thread Gregory P. Smith
On Mon, Feb 7, 2022 at 4:52 PM Christopher Barker wrote: > From the perspective of some that writes a lot of computational code: > > On Mon, Feb 7, 2022 at 10:25 AM Mark Dickinson wrote: > >> - Should we require the presence of NaNs in order for CPython to build? >> - Should we require IEEE 754

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-07 Thread Jim J. Jewett
- Should we require the presence of NaNs in order for CPython to build? - Should we require IEEE 754 floating-point for CPython-the-implementation? - Should we require IEEE 754 floating-point for Python-the-language? I don't have strong opinions on the first two, but for the language definition,

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-07 Thread Christopher Barker
>From the perspective of some that writes a lot of computational code: On Mon, Feb 7, 2022 at 10:25 AM Mark Dickinson wrote: > - Should we require the presence of NaNs in order for CPython to build? > - Should we require IEEE 754 floating-point for CPython-the-implementation? > Yes, and yes, to

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-07 Thread Victor Stinner
On Tue, Feb 8, 2022 at 12:19 AM Brett Cannon wrote: > Do we have a buildbot that has a CPU or OS that can't handle IEEE-754? What > are the chances we will get one? If the answers are "none" and "slim", then > it seems reasonable to require NaN and IEEE-754. All CPU architectures of current bui

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-07 Thread Brett Cannon
On Mon, Feb 7, 2022 at 12:31 PM Gregory P. Smith wrote: > > > On Mon, Feb 7, 2022 at 11:06 AM Victor Stinner > wrote: > >> Hi Mark, >> >> Aha, good, you posted an email to python-dev, good :-) Last days, I >> was trying to collect more data about this topic, especially find >> platforms which *d

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-07 Thread Brett Cannon
On Mon, Feb 7, 2022 at 11:02 AM Victor Stinner wrote: > Hi Mark, > > Aha, good, you posted an email to python-dev, good :-) Last days, I > was trying to collect more data about this topic, especially find > platforms which *don't* support IEEE 754, before posting to > python-dev. > > Nowadays, ou

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-07 Thread Gregory P. Smith
On Mon, Feb 7, 2022 at 11:06 AM Victor Stinner wrote: > Hi Mark, > > Aha, good, you posted an email to python-dev, good :-) Last days, I > was trying to collect more data about this topic, especially find > platforms which *don't* support IEEE 754, before posting to > python-dev. > > Nowadays, ou

[Python-Dev] Re: Should we require IEEE 754 floating-point for CPython?

2022-02-07 Thread Victor Stinner
Hi Mark, Aha, good, you posted an email to python-dev, good :-) Last days, I was trying to collect more data about this topic, especially find platforms which *don't* support IEEE 754, before posting to python-dev. Nowadays, outside museums, it's hard to find computers which don't implement IEEE