
Symbolic differentiation: manipulate algebraic expressions analytically
Source:R/geron_w4d_native.R
morie_geron_symbolic_diff.RdParses source into a tree, applies derivative rules (sum, product,
quotient, power, chain, sin/cos/exp/log/tanh/sqrt), constant-folds.
When at is given, checks against a central finite difference.
Value
list with derivative, tree, expression, value, numeric_check, error, nodes, var, estimate, n, method.
Examples
S <- c("a", "b", "c")
morie_geron_symbolic_diff(S)
#> $derivative
#> [1] "0"
#>
#> $tree
#> $tree[[1]]
#> [1] "num"
#>
#> $tree[[2]]
#> [1] 0
#>
#>
#> $expression
#> [1] "a"
#>
#> $value
#> NULL
#>
#> $numeric_check
#> NULL
#>
#> $error
#> NULL
#>
#> $nodes
#> [1] 1
#>
#> $var
#> [1] "x"
#>
#> $estimate
#> [1] 1
#>
#> $n
#> [1] 1
#>
#> $method
#> [1] "Rule-based differentiation of the parsed expression tree with constant folding"
#>