[racket] Numerical Optimization in Racket (i.e. Finding Local Minima and Maxima)

From: Doug Williams (m.douglas.williams at gmail.com)
Date: Mon Oct 28 09:36:49 EDT 2013

The science collection predates Typed Racket - among many other things. It
is hand optimized using the fl- and fx- primitives, which were added before
Typed Racked, but this misses some optimizations that Typed Racket is able
to do. The biggest problem with the hand optimized code is that bugs tend
to lead to seg faults rather than decent error messages. It also does some
optimization of sequences to make some loops work better, but this mainly
just affects the statistics routines.

I also added unchecked- versions to many/most of the computationally
intensive routines to bypass the contract checks. This was important in the
early days of the contracts, but I'm not so sure it is anymore. [The
exception is the median and quantile routines that check for a sorted
sequence and the contracts are O(n) while the code itself is O(1).

Doug


On Mon, Oct 28, 2013 at 12:51 AM, Konrad Hinsen
<konrad.hinsen at fastmail.net>wrote:

> Daniel King writes:
>
>  > I think Racket has the first three features (the math library looks
>  > awesome), but AFAICT it lacks a numerical optimizer. Has anyone
>
> The math library *is* awesome (I have been discovering it myself
> during the last weeks). The only other source of math/science code
> I know of is Doug Williams' science collection on PLaneT:
>
> http://planet.racket-lang.org/display.ss?package=science.plt&owner=williams
>
> I don't see any optimization routines in there, so you are probably
> right that there is none, at least nothing published.
>
> Konrad.
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20131028/26d2fe82/attachment.html>

Posted on the users mailing list.