Skip to content

Commit

Permalink
multiply by dret
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bossart authored and ChrisRackauckas committed Sep 27, 2024
1 parent 181748f commit 9382e4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/DiffEqBaseEnzymeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ function EnzymeRules.reverse(config::Enzyme.EnzymeRules.ConfigWidth{1},
func::Const{typeof(DiffEqBase.fastpow)}, dret::Active, tape, _x::Active, _y::Active)
x = _x.val
y = _y.val
dxval = y * (fastpow(x,y - 1))
dyval = x isa Real && x<=0 ? Base.oftype(float(x), NaN) : (fastpow(x,y))*log(x)
dxval = dret.val * y * (fastpow(x,y - 1))
dyval = x isa Real && x<=0 ? Base.oftype(float(x), NaN) : dret.val * (fastpow(x,y))*log(x)
return (dxval, dyval)
end

Expand Down

0 comments on commit 9382e4b

Please sign in to comment.