You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of rounding errors, in some cases explicitly symmetric matrices might produce non-symmetric inverses:
using StaticArrays, LinearAlgebra
c =cholesky(@SMatrix[π 3.1; 3.112.0])
d =inv(c)
d[1,2] - d[2,1] # returns -1.3877787807814457e-17
This can be a serious issue and it can break various codes: for example, cholesky(d) would fail. Note that the same code works without problems if one uses standard arrays instead of static ones:
Because of rounding errors, in some cases explicitly symmetric matrices might produce non-symmetric inverses:
This can be a serious issue and it can break various codes: for example,
cholesky(d)
would fail. Note that the same code works without problems if one uses standard arrays instead of static ones:A fix is to force, in the definition of
inv(::Cholesky)
StaticArrays.jl/src/cholesky.jl
Lines 72 to 74 in c4092a1
the symmetry of the result:
The text was updated successfully, but these errors were encountered: