Skip to content

Commit 6fb2389

Browse files
committed
fix typo on Wachter law
1 parent d1c406b commit 6fb2389

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

examples/marchenkopasturops.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ c,d = sqrt(a/(a+b) * (1-1/(a+b))), sqrt(1/(a+b) * (1-a/(a+b)))
2323
lmin,lmax = (c-d)^2,(c+d)^2
2424
U = chebyshevu(lmin..lmax)
2525
x = axes(U,1)
26-
w = @. (a+b) * sqrt((x-lmin)*(lmax-x)/(2π*x*(1-x)))
26+
w = @. (a+b) * sqrt((x-lmin)*(lmax-x))/(2π*x*(1-x))
2727
Q = LanczosPolynomial(w, U)
2828
plot(Q[:,1:7])

test/test_lanczos.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,9 @@ import ClassicalOrthogonalPolynomials: recurrencecoefficients, PaddedLayout, ort
298298
lmin,lmax = (c-d)^2,(c+d)^2
299299
U = chebyshevu(lmin..lmax)
300300
x = axes(U,1)
301-
w = @. (a+b) * sqrt((x-lmin)*(lmax-x)/(2π*x*(1-x)))
301+
w = @. (a+b) * sqrt((x-lmin)*(lmax-x))/(2π*x*(1-x))
302302
Q = LanczosPolynomial(w, U)
303-
@test Q[0.5,1:3] [0.9384176649676137,1.2140849874743076,0.5387898199391473]
303+
@test jacobimatrix(Q)[1,1] 1/3
304+
@test Q[0.5,1:3] [1, 1.369306393762913, 0.6469364618834543]
304305
end
305306
end

0 commit comments

Comments
 (0)