[Haskell-cafe] ANNOUNCE: Runge-Kutta library -- solve ODEs

Uwe Hollerbach uhollerbach at gmail.com
Sun Apr 19 15:21:07 EDT 2009

Hello, all, I'm pleased to announce a small Runge-Kutta library for
numerically solving ordinary differential equations, which I'm hereby
unleashing upon an unsuspecting world. The README is as follows:

    This is a small module collecting about a dozen Runge-Kutta methods
    of different orders, along with a couple of programs to exercise them.

    Build and run testrk, volterra, volterra2, and arenstorf:

    o   testrk exercises all of the methods in a non-adaptive way,
        solving a test problem with a known analytic solution,
        to check convergence. (This was what first indicated that
        there was a problem with the Fehlberg 7(8) listing in HNW.)

    o   volterra uses a non-adaptive method to solve the Lotka-Volterra
        equations from t=0 to t=40: either from a built-in starting point,
        or from a starting point specified on the command line.

    o   volterra2 does the same, except it uses an adaptive solver

    o   arenstorf solves the restricted 3-body problem (earth+moon+satellite)
        using an adaptive solver with some specific initial conditions
        which yield periodic orbits

    The volterra2 and arenstorf examples use an "oracle" function to
    decide what is a good step size. Right now that oracle function is in
    each test file; arguably it should be in the RungeKutta module.
    Eventually it will be, but I haven't spent much time yet on making
    that oracle especially good.

I have so far only tested it with ghc 6.8.3 on MacOS 10.3.9 (powerPC),
but I know of no reason why it wouldn't work with other versions and

It's BSD licensed, in fact I stole the LICENSE file from ghc (and
filed off the serial numbers).

I'm afraid I haven't messed with cabal much yet, so it's not
cabalized; neither is it uploaded to hackage, as I have no account
there. If someone wants to do either of those, please feel entirely
free to do so.

In addition to attaching a tarball to this message, I'm also putting
this onto my (sadly neglected) web site: it will live at


-------------- next part --------------
A non-text attachment was scrubbed...
Name: rk-1.0.0.tar.gz
Type: application/x-gzip
Size: 9010 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090419/96a64fde/rk-1.0.0.tar.bin

More information about the Haskell-Cafe mailing list