[Python-Dev] Numerical robustness, IEEE etc.
nmm1 at cus.cam.ac.uk
Mon Jun 19 17:29:00 CEST 2006
Michael Hudson <mwh at python.net> wrote:
> > As I have posted to comp.lang.python, I am not happy with Python's
> > numerical robustness - because it basically propagates the 'features'
> > of IEEE 754 and (worse) C99.
> That's not really now I would describe the situation today.
It is certainly the case in 2.4.2, however you would describe it.
> > 2) Because some people are dearly attached to the current behaviour,
> > warts and all, and there is a genuine quandary of whether the 'right'
> > behaviour is trap-and-diagnose, propagate-NaN or whatever-IEEE-754R-
> > finally-specifies (let's ignore C99 and Java as beyond redemption),
> Why? Maybe it's clear to you, but it's not totally clear to me, and
> it any case the discussion would be better informed for not being too
Why which? There are several things that you might be puzzled over.
And where can I start? Part of the problem is that I have spent a LOT
of time in these areas in the past decades, and have been involved
with many of the relevant standards, and I don't know what to assume.
> > there might well need to be options. These can obviously be done by
> > a command-line option, an environment variable or a float method.
> > There are reasons to disfavour the last, but all are possible. Which
> > is the most Pythonesque approach?
> I have heard Tim say that there are people who would dearly like to be
> able to choose. Environment variables and command line switches are
> not Pythonic.
All right, but what is? Firstly, for something that needs to be
program-global? Secondly, for things that don't need to be brings
up my point of adding methods to a built-in class.
> I'm interested in making Python's floating point story better, and
> have worked on a few things for Python 2.5 -- such as
> pickling/marshalling of special values -- but I'm not really a
> numerical programmer and don't like to guess what they need.
Ah. I must get a snapshot, then. That was one of the lesser things
on my list. I have spent a lot of the past few decades in the numerical
programming arena, from many aspects.
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email: nmm1 at cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
More information about the Python-Dev