[Python-ideas] Floating point contexts in Python core

Mark Adam dreamingforward at gmail.com
Fri Oct 12 02:08:21 CEST 2012

On Thu, Oct 11, 2012 at 6:35 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> On 11/10/12 16:45, Greg Ewing wrote:
>> Are you sure there would be any point in this? People who
>> specifically *want* base-2 floats are probably quite happy
>> with the current float type, and wouldn't appreciate having
>> it slowed down, even by a small amount.
> I would gladly give up a small amount of speed for better control
> over floats, such as whether 1/0.0 raised an exception or
> returned infinity.

Umm, you would be giving up a *lot* of speed.  Native floating point
happens right in the processor, so if you want special behavior, you'd
have to take the floating point out of the CPU and into "user space".


More information about the Python-ideas mailing list