commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Al Chou <>
Subject Re: [math] Greetings from a newcomer (but not to numerics)
Date Mon, 26 May 2003 00:10:01 GMT

--- Phil Steitz <> wrote:
> Al Chou wrote:
> > ... I'm heavy on
> > practice and light on theory, though I audited every numerical computing
> class
> > offered, both undergrad and grad, when I was at UCLA.  So, I won't be of
> much
> > use proving things, but I hope my experience in evaluating algorithms'
> > appropriateness for specific problems based on careful reading and thought
> will
> > help out the project.
> > 
> I am certain that it will. I also have a fair amount of applied 
> experience, but most of it in other languages (probably obvious from my 
> code -- he he) and a few years back (like my mathematical career). This 
> will be interesting.

Cool.  All my numerical code in grad school was in Pascal(!) and FORTRAN 77,
but since then I've written in neither of those.  Ruby is my language of choice
these days, though I started with sed, AWK, and PERL in grad school and have
learned enough TCL, VBScript, and Python to be dangerous to myself.  I've coded
some in Java and was heavily into trying to be well-read in Java and C++ a
couple of years ago but have given that up for the time being.  I also spent
many hours on the train learning Scheme from _The Scheme Programming Language_
( on my Handspring but never quite got
the hang of doing things recursively as required by the exercises.

> > * Newton's method for finding roots
> > [ADC] It would also be good to provide the contextual infrastructure
> > (bracketing a root) as well as methods that don't rely on being able to
> compute
> > the derivative of the function.  Someday I would also like to re-create a
> > complex equation solver based on inverse quadratic interpolation (sadly, I
> > can't remember the original author's name) I once had in my toolkit.
> Yes.  One thing that I am struggling with here is how to do something 
> simple and useful without function pointers.  How should we think about 
> the interface for rootfinding (however we do it) in Java?

I'm accustomed to the equivalent of a function pointer being used in FORTRAN. 
Is passing as a parameter an object that has methods to provide the required
function values (and derivative[s] if necessary) not a good model?

> > * Exponential growth and decay
> > [ADC] Not sure what is supposed to be provided here.
> Just simple computations to support mostly financial applications.

Beyond computing a * exp( b * x ) I can't picture what is needed here.  Can you
please give an example?

> > * Polynomial Interpolation (curve fitting)
> > [ADC] Rational function interpolation and cubic spline, too.
> Yes.  Here again, step 0 is how to think about the interface/domain in Java.

I also want us to keep in mind that there's a distinction between interpolation
and curve fitting.  A fitted curve doesn't have to pass through all the input
data points, but an interpolating curve must.

> > * Sampling from Collections
> > [ADC] Probably brings up the thorny topic of (good) random number
> generation,
> > about which Hamming said, "The generation of random numbers is too
> important to
> > be left to chance."
> This is a place where we could spend *lots* of time, recruit some number 
> theorists and end up with something marginally better than what ships 
> with the JDK. If someone wants to do this, great, but I think we can 
> probably assemble some useful stuff just leveraging the JDK generators 
> (a la RandomData).  Just writing the relatively trivial code to generate 
> a random sub-collection from a collection using the JDK PRNG would 
> probably be useful to a lot of applications. It could be, however, that 
> this really belongs in commons-collections.

As I said in an earlier post, we should briefly assess the quality of the JDK's
PRNG before deciding whether it needs a replacement.


Albert Davidson Chou

    Get answers to Mac questions at .

Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

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

View raw message