Skip to content

Commit cb5552a

Browse files
author
Andy Ferris
committed
Resolved type instability in eig for 3x3
1 parent 87aa60b commit cb5552a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/eigen.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ end
123123

124124
# the eigenvalues satisfy eig1 <= eig2 <= eig3
125125
eig3 = q + 2 * p * cos(phi)
126-
eig1 = q + 2 * p * cos(phi + (2*pi/3))
126+
eig1 = q + 2 * p * cos(phi + (2*S(pi)/3))
127127
eig2 = 3 * q - eig1 - eig3 # since trace(Afull) = eig1 + eig2 + eig3
128128

129129
# Now get the eigenvectors

0 commit comments

Comments
 (0)