diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-11-10 22:39:05 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-11-10 22:39:05 +0100 |
commit | 4d573fa32997a8e4824bf8326fb675d0c195b1ac (patch) | |
tree | b09ebda92ed78065720da385a9954454899af1fd | |
parent | 013e01e28aba090c065ed584671a65aa339ea51b (diff) |
Fix forward derivative of 'exp'
-rw-r--r-- | src/ForwardAD/DualNumbers.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ForwardAD/DualNumbers.hs b/src/ForwardAD/DualNumbers.hs index 0a08926..e8b140e 100644 --- a/src/ForwardAD/DualNumbers.hs +++ b/src/ForwardAD/DualNumbers.hs @@ -79,7 +79,7 @@ dop = \case EPair ext (recip' t x) (mul t (neg t (recip' t (mul t x x))) dx)) OExp t -> floatingDual t $ unFloat (\(x, dx) -> - EPair ext (EOp ext (OExp t) x) (EOp ext (OExp t) dx)) + EPair ext (EOp ext (OExp t) x) (mul t (EOp ext (OExp t) x) dx)) OLog t -> floatingDual t $ unFloat (\(x, dx) -> EPair ext (EOp ext (OLog t) x) (mul t (recip' t x) dx)) |