Skip to content

Commit 9382e4b

Browse files
m-bossartChrisRackauckas
authored andcommitted
multiply by dret
1 parent 181748f commit 9382e4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/DiffEqBaseEnzymeExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ function EnzymeRules.reverse(config::Enzyme.EnzymeRules.ConfigWidth{1},
9090
func::Const{typeof(DiffEqBase.fastpow)}, dret::Active, tape, _x::Active, _y::Active)
9191
x = _x.val
9292
y = _y.val
93-
dxval = y * (fastpow(x,y - 1))
94-
dyval = x isa Real && x<=0 ? Base.oftype(float(x), NaN) : (fastpow(x,y))*log(x)
93+
dxval = dret.val * y * (fastpow(x,y - 1))
94+
dyval = x isa Real && x<=0 ? Base.oftype(float(x), NaN) : dret.val * (fastpow(x,y))*log(x)
9595
return (dxval, dyval)
9696
end
9797

0 commit comments

Comments
 (0)