Skip to content

Commit

Permalink
add missing module prefixes and spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
longemen3000 committed Jun 2, 2024
1 parent 4213578 commit feb22c7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
13 changes: 7 additions & 6 deletions ext/PolyLogChainRulesExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ module PolyLogChainRulesExt

using PolyLog
using ChainRulesCore
@scalar_rule reli4(x) reli3(x)/x
@scalar_rule reli3(x) reli2(x)/x
@scalar_rule reli2(x) reli1(x)/x
@scalar_rule reli1(x) one(x)/(one(x)-x)
@scalar_rule reli(n,x) reli(n-1,x)/x
end #module
@scalar_rule PolyLog.reli4(x) PolyLog.reli3(x)/x
@scalar_rule PolyLog.reli3(x) PolyLog.reli2(x)/x
@scalar_rule PolyLog.reli2(x) PolyLog.reli1(x)/x
@scalar_rule PolyLog.reli1(x) one(x)/(one(x)-x)
@scalar_rule PolyLog.reli(n,x) PolyLog.reli(n-1,x)/x
end #module

2 changes: 1 addition & 1 deletion test/Li2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@
@test PolyLog.li2(1.0 + 1e300im) -238585.82620504462 + 1085.06766186232im rtol=eps(Float64)

#ForwardDiff Test
@test ForwardDiff.derivative(PolyLog.reli2,float(pi)) == reli1(float(pi))/float(pi)
@test ForwardDiff.derivative(PolyLog.reli2,float(pi)) == ForwardDiff.reli1(float(pi))/float(pi)
end
2 changes: 1 addition & 1 deletion test/Li3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@
@test PolyLog.li3(1.0 + 1e300im) -5.4936606061973454e7 + 374771.031356405im rtol=eps(Float64)

#ForwardDiff Test
@test ForwardDiff.derivative(PolyLog.reli3,float(pi)) == reli2(float(pi))/float(pi)
@test ForwardDiff.derivative(PolyLog.reli3,float(pi)) == ForwardDiff.reli2(float(pi))/float(pi)
end
2 changes: 1 addition & 1 deletion test/Li4.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@
@test PolyLog.li4(1.0 + 1e300im) -9.4872648206269765e9 + 8.62951114411071e7im rtol=eps(Float64)

#ForwardDiff Test
@test ForwardDiff.derivative(PolyLog.reli4,float(pi)) == reli3(float(pi))/float(pi)
@test ForwardDiff.derivative(PolyLog.reli4,float(pi)) == ForwardDiff.reli3(float(pi))/float(pi)
end

0 comments on commit feb22c7

Please sign in to comment.