Charles R Harris
Wed Jun 10 01:16:40 CDT 2009
On Tue, Jun 9, 2009 at 11:49 PM, Robert Kern <firstname.lastname@example.org> wrote:
> On Wed, Jun 10, 2009 at 00:46, David Goldsmith<email@example.com>
> > No, this is what I meant:
> >>>> N.allclose([N.tanh(N.pi*1j/2)],[N.inf])
> > False
> >>>> N.allclose([1/N.tanh(N.pi*1j/2)],[0.])
> > True
> > So in this case, one does need to reciprocate first (or am I using
> N.allclose wrong in the first example?)
> Yes. Only inf is "close" to inf.
> > I should probably 'Note' this tanh's doc (and other transcendentals that
> may exhibit this behavior).
> <shrug> It's generic to all floating point implementations of
> transcendentals. I'd prefer not to clutter up each ufunc's docs. A
> section in the User's Guide about floating point arithmetic in general
> might be worthwhile, though.
With examples, too. And now you have one ;) Examples would help users
understand the implications of the imprecision.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scipy-dev