[SciPy-dev] [SciPy-user] numpy's math library?
Charles R Harris
charlesr.harris at gmail.com
Wed Jan 11 23:07:39 CST 2006
On 1/11/06, Travis Oliphant <oliphant.travis at ieee.org> wrote
> David M. Cooke wrote:
> >Robert Kern <robert.kern at gmail.com> writes:
> >>David M. Cooke wrote:
> >>>I've also exposed log1p(x) = log(1+x) and expm1(x) = exp(x)-1 as
> >>>ufuncs, since those are quite useful if you're worrying about
> >>>cancellation errors.
> >>Of course, they're useful, but they're also in scipy.special. Let's try
> not to
> >>migrate more things from scipy to numpy than we strictly have to. So,
> I'm -1 on
> >>exposing log1p() and expm1() in numpy.
> >They're also part of the C99 standard, so I'd say there is some
> >argument for making them part of numpy: exposing functions already
> >defined by the C library. Mind you, we're also missing exp10, pow10,
> >exp2, log2, cbrt, erf, erfc, lgamma, tgamma, and a few others.
> Will we really have to test for all of these if we add them? It would
> be nice to have a single HAVE_C99 defined that we could use to test for
> the presence and/or absence of these functions.
I use erf and erfc pretty often. If only every c compiler were c99
compliant we could bring in all the standard functions. What I'd really like
to do is add all of scipy.special into the numpy package space, but
unfortunately significant parts are in fortran. Maybe we could have a small
project to bring a selected bunch of functions over to c and then into
numpy? Do we need complex versions of them too?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scipy-dev