Skip to content

Commit

Permalink
Fix test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion committed Nov 21, 2020
1 parent 1eb7221 commit c0d3b81
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions src/chainrules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,52 @@ ChainRulesCore.@scalar_rule(trigamma(x), polygamma(2, x))
# binary
ChainRulesCore.@scalar_rule(
besselj(ν, x),
(@thunk error("not implemented"), (besselj- 1, x) - besselj+ 1, x)) / 2),
(
ChainRulesCore.@thunk(error("not implemented")),
(besselj- 1, x) - besselj+ 1, x)) / 2
),
)
ChainRulesCore.@scalar_rule(
besseli(ν, x),
(@thunk error("not implemented"), (besseli- 1, x) + besseli+ 1, x)) / 2),
(
ChainRulesCore.@thunk(error("not implemented")),
(besseli- 1, x) + besseli+ 1, x)) / 2,
),
)
ChainRulesCore.@scalar_rule(
bessely(ν, x),
(@thunk error("not implemented"), (bessely- 1, x) - bessely+ 1, x)) / 2),
(
ChainRulesCore.@thunk(error("not implemented")),
(bessely- 1, x) - bessely+ 1, x)) / 2,
),
)
ChainRulesCore.@scalar_rule(
besselk(ν, x),
(@thunk error("not implemented"), -(besselk- 1, x) + besselk+ 1, x)) / 2),
(
ChainRulesCore.@thunk(error("not implemented")),
-(besselk- 1, x) + besselk+ 1, x)) / 2,
),
)
ChainRulesCore.@scalar_rule(
hankelh1(ν, x),
(@thunk error("not implemented"), (hankelh1- 1, x) - hankelh1+ 1, x)) / 2),
(
ChainRulesCore.@thunk(error("not implemented")),
(hankelh1- 1, x) - hankelh1+ 1, x)) / 2,
),
)
ChainRulesCore.@scalar_rule(
hankelh2(ν, x),
(@thunk error("not implemented"), (hankelh2- 1, x) - hankelh2+ 1, x)) / 2),
(
ChainRulesCore.@thunk(error("not implemented")),
(hankelh2- 1, x) - hankelh2+ 1, x)) / 2,
),
)
ChainRulesCore.@scalar_rule(
polygamma(m, x),
(@thunk error("not implemented"), polygamma(m + 1, x))
(
ChainRulesCore.@thunk(error("not implemented")),
polygamma(m + 1, x),
),
)
# todo: setup for common expr
ChainRulesCore.@scalar_rule(
Expand Down

0 comments on commit c0d3b81

Please sign in to comment.