commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [math] some more utilities functions
Date Sun, 12 Aug 2012 20:48:29 GMT
On 8/8/12 7:58 AM, Luc Maisonobe wrote:
> Hi all,
> I have encountered some missing functions that are easy to fix in
> [math]. I've done it on my local copy but would like your opinion before
> committing them.
> There are no function to raise a double to an int argument. There are
> similar functions to raise an int, a long or a BigDecimal, but not
> double. I have added one and arbitrarily choose to put it in FastMath.

+1 to add this to FastMath
> There are no function to compute Stirling numbers of the second kind
> (they are used in some combinatorial problems, and also appear in some
> high order derivatives). I have added one in ArithmeticUtils, with some
> lazy evaluation and caching to avoid recomputing them all the time, as
> we often need only the smaller ones.

+1 to add this.
> The function to compute binomial coefficients in ArithmeticUtils does
> not cache its results. This could be easily added for the smallest
> coefficients (I've done that for Striling number as explained in the
> paragraph above).

The computations are trivial for small n, so I am not sure this is
really worth it.
> What do you think about these additions?

Sorry for slow response.  Looks like this has already been done now.

One thing to think about is eventually splitting the combinatorial
methods out into a separate package.

> Luc
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message