[Numpy-discussion] arange and floating point arguments
Fri Sep 14 17:09:26 CDT 2007
Charles R Harris wrote:
> In the case of arange it should be possible to determine when the result
> is potentially ambiguous and issue a warning. For instance, if the
> argument of the ceil function is close to its rounded value.
What's "close"? The appropriate tolerance depends on the operations that would
cause error. For literal inputs, where the only source of error is
representation error, 1 eps would suffice, but then so would linspace(). For
results of other computations, you might need more than 1 eps. But if you're
doing computations, then it oughtn't to matter whether you get the endpoint or
not (since you don't know what the values are anyway).
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion