Skip to content

Commit 933f8be

Browse files
committed
precompile special functions
1 parent 725b661 commit 933f8be

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/precompile.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@ using SnoopPrecompile
44
splist = Any[Jacobi(1, 1), Chebyshev(), Ultraspherical(1)]
55
append!(splist, Any[Jacobi(1, 1, 0..1), Chebyshev(0..1), Ultraspherical(1, 0..1)])
66
push!(splist, Chebyshev(Segment(1.0+im,2.0+2im)))
7+
# special functions
8+
spfns = Any[sin, cos, exp]
79
@precompile_all_calls begin
810
for S in splist
911
v = [0.0, 1.0]
1012
f = Fun(S,v)
13+
1/(f^2+1)
1114
abs(DefiniteIntegral()*f - sum(f))
1215
norm(Derivative()*f-f')
1316
norm(differentiate(integrate(f)) - f)
1417
norm(differentiate(cumsum(f))-f)
1518
norm(first(cumsum(f)))
19+
for spfn in spfns
20+
spfn(f)
21+
end
1622
end
1723
roots(Fun(sin,Interval(big"0.0", big"1.0")))
1824
end

0 commit comments

Comments
 (0)