[Python-ideas] Python Numbers as Human Concept Decimal System

Stefan Krah stefan at bytereef.org
Tue Mar 11 20:46:25 CET 2014


random832 at fastmail.us <random832 at fastmail.us> wrote:
> On Tue, Mar 11, 2014, at 14:41, Stefan Krah wrote:
> >   1) It must be possible to set rounding and traps, so the context
> >      is not really fixed.
> 
> It _must_ be possible? If there's a way to set rounding for floats, I
> can't find it. As for traps, I can't find that either, but a constant
> operation that may (will?) trap disables constant-folding.

If we use IEEE, the default context would not raise anything -- infinities
and NaNs would silently propagate.  This is valuable, but it should be
possible switch it off.  Settting rounding is obviously valuable, too.


Stefan Krah




More information about the Python-ideas mailing list