[Numpy-discussion] bug fix for exp()
fgibbons at hms.harvard.edu
Mon Oct 7 13:54:06 CDT 2002
I've been lurking for a while, and using Numeric for about 5-6 months. I
submitted a bug report about two months ago
regarding incorrect underflow behavior in exp().
I'd really like to get that fixed, nobody else seems to be working on it,
and so I checked out the CVS tree. From reading the API section of the
manual, I can see that unary ufuncs are driven by PyUFunc_FromFuncAndData()
and that exp already has check_return set to 1, so that it should clean up
rank-0 arrays, and raise the appropriate Python exception when 'errno' is
set by a math error.
I'd like to take a closer look into things, and one way of doing that would
be to use a unit-test suite, but it's not obvious where that is (if at all)
in the source distribution. Is there one?
Another way to look into it would be if I could write some C code, then
drop into Numeric's code and track what's going on when I call exp() for
arguments that underflow. Is there a harness out there that I could just
adapt to my own needs. Surely that's how other developers do it. If not,
how *do* you fix bugs?
I've already added some features to JNumeric, and introduced a unit-test
suite there. I have so few problems using Numeric, I'd really like to nail
this one involving exp(), since it's holding me back.
PhD, Computational Biologist,
Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA 02115, USA.
Tel: 617-432-3555 Fax:
More information about the Numpy-discussion