Modifying the value of a float-like object

Eric.Le.Bigot at spectro.jussieu.fr Eric.Le.Bigot at spectro.jussieu.fr
Wed Apr 15 04:53:03 EDT 2009


To Peter: What I had in mind was to implement your calc() function;
you could do something similar with your loop in the previous post by
replacing "for f.shift..." by "f.shift = 1"; this would give you 2
values, which you can combine with your unused variable in order to
obtain the same value as with your calc() function.

To Peter and Steven: I now realize that the interval arithmetic that
you propose is not trivial, if one wants optimal confidence intervals:
correlations between uncertainties are very hard to handle.  The most
robust method is to implement Peter's calc() method.  But again, when
calculations are not done through explicit argument passing, as in
Peter's example, mutable floats are useful!



More information about the Python-list mailing list