Skip to content

Instantly share code, notes, and snippets.

@carlobaldassi
Created September 11, 2012 10:17
Show Gist options
  • Save carlobaldassi/3697402 to your computer and use it in GitHub Desktop.
Save carlobaldassi/3697402 to your computer and use it in GitHub Desktop.
Lapack test failure example
dl = [-0.654981, -0.93716 , -0.459534, -0.0961306]
d = [1.03823, 1.00984, 1.30874 , 1.23003 , 1.98585]
v = [0.878788, 0.550649, 1.32675, -0.0301826, -0.48512]
# lines 174-178 of test/lapack.jl
Ts = Tridiagonal(dl,d,dl)
Fs = full(Ts)
invFsv = Fs\v
Tldlt = ldlt(Ts)
x = Tldlt\v
err = norm(x - invFsv)
println("err = ", err)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment