Boost logo

Boost :

Subject: Re: [boost] [math] Does any one interesting in calculating derivative for a expression automatically?
From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2009-03-04 05:03:15


Hi,

Funnily, I was thinking about writing something like that those last
days, to implement some dimension-agnostic linear algebra expressions
with dimension known at compile-time. Obviously it wouldn't only
involve derivatives, but what you show is quite close to what I had in
mind in terms of syntax. So I'm interested :-)

BTW Steven's right: proto is definitely the right tool to do that.

On Tue, Mar 3, 2009 at 7:41 PM, John Maddock <john_at_[hidden]> wrote:
> 2) Isn't it easier to just calculate the derivative within a symbolic math
> package and then cut and paste the result into your code (Yacas is free for
> example)?

>From my point of view, the main interest would be to compute
expressions containing some compile-time values provided by the user.
For example I want to calculate the volume of a hypersphere which is:
(pi^(N/2)*r^N) / gamma(N/2 + 1), with dimension N known at
compile-time. If the user happens to work only with N=2, that is
circles, I want the resulting expression to be as effective as a
hand-written pi*r^2 (the volume of a hypersphere<2> is the area of a
circle). It's technically feasible.

Bruno


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk