Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Add exp10 method for Dual (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
willtebbutt authored Oct 11, 2018
1 parent ae46545 commit 1219789
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,8 @@ function fmad_expr(f, x::Type{<:Tuple})
return body
end
@generated fmad(f, x) = fmad_expr(f, x)

function Base.exp10(x::Dual)
y = exp10(DualNumbers.value(x))
return Dual(y, y * log(10) * DualNumbers.epsilon(x))
end

0 comments on commit 1219789

Please sign in to comment.