Skip to content

Commit

Permalink
register asinh and acosh in standard lib (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
FHoltorf authored Sep 3, 2024
1 parent 0ac40c2 commit 78b3552
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/functionlist.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@
x -> 57.29577951308232286464772187173366546630859375 * 2 * x / (1 + x^2)^2
)
@register_univariate(Base.sinh, cosh, sinh)
@register_univariate(Base.asinh, x -> 1/sqrt(x^2 + 1), x -> - x/sqrt(x^2 + 1)^3)
@register_univariate(Base.cosh, sinh, cosh)
@register_univariate(Base.acosh, x -> 1/sqrt((x-1)*(x+1)), x -> - x/sqrt((x - 1)*(x + 1))^3)
@register_univariate(Base.tanh, x -> 1 - tanh(x)^2, x -> -2 * tanh(x) * (1 - tanh(x)^2))
@register_univariate(
Base.csch,
Expand Down
2 changes: 2 additions & 0 deletions test/ADTest/ADTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ const FUNCTIONS = [
# ("basic-functions-atand", x-> atand(x[1])), # cannot extend function
# ("basic-functions-acotd", x-> acotd(x[1])), # cannot extend function
("basic-functions-sinh", x -> sinh(x[1])),
("basic-functions-asinh", x -> asinh(x[1])),
("basic-functions-cosh", x -> cosh(x[1])),
("basic-functions-acosh", x -> acosh(x[1] + 1)),
("basic-functions-tanh", x -> tanh(x[1])),
("basic-functions-csch", x -> csch(x[1])),
("basic-functions-sech", x -> sech(x[1])),
Expand Down

0 comments on commit 78b3552

Please sign in to comment.