I create a symbolic derivative mechanism. for example
let f = <@ fun x:double -> x * x @> let df = der f
and the resulting expression will be
<@ 2 * x @>
Actual equations can be arbitrarily complex.
Generating derivatives is not too hard using recursive pattern matching and transformations, but in the end I want to use the generated equations in dense numerical cycles, as if I had a hand written them. This is a numerical computational code, so faster is always better (if possible)
I looked at the FSharpX quote compiler, but it looks more like an interpreter than a compiler.
bradgonesurfing
source share