exp package:inf-backprop

Differentiable logging exponent function.
Natural logarithm differentiable function.

Examples of usage

>>> import Prelude (Float)

>>> import InfBackprop (call, derivative)

>>> call exp 2
7.38905609893065
>>> import Debug.SimpleExpr.Expr (variable)

>>> x = variable "x"

>>> derivative exp x
1·exp(x)
Returns symbolically differentiable Simple Expression.

Examples of usage

>>> import Control.Arrow (runKleisli)

>>> import Control.Monad.Logger (runStdoutLoggingT)

>>> import Debug.SimpleExpr.Expr (variable)

>>> import InfBackprop (call, derivative, backpropExpr)
>>> x = variable "x"

>>> f = backpropExpr "f"

>>> call f x
f(x)
>>> derivative f x
1·f'(x)
Returns symbolically differentiable logging symbolic function.

Examples of usage

>>> import Control.Arrow (runKleisli)

>>> import Control.Monad.Logger (runStdoutLoggingT)

>>> import Debug.SimpleExpr.Expr (variable)

>>> import InfBackprop (call, derivative)
>>> x = variable "x"

>>> f = loggingBackpropExpr "f"

>>> runStdoutLoggingT $ runKleisli (call f) x
[Info] Calculating f of x => f(x)
f(x)
>>> runStdoutLoggingT $ runKleisli (derivative f) x
[Info] Calculating f of x => f(x)
[Info] Calculating f' of x => f'(x)
[Info] Calculating multiplication of 1 and f'(x) => 1·f'(x)
1·f'(x)