Skip to content

symbolic-taylor-series can't take perturbations as arguments #168

@sritchie

Description

@sritchie

For example:

((D (fn [x] (first (symbolic-taylor-series exp x)))) 10)
;;=> 0

What's happening:

  • x is getting substituted for a symbol, say x0
  • this is replacing the Dual, not doing the substitition inside of the primal
  • so (exp x0) pops out, and the literal implementation doesn't recurse into its lists, because in NORMAL generic arithmetic without the subs, (exp <dual>) would return type dual, not type literal

So we can fix typical-object here or do something in the function body...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions