1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/matrix/eigenvalue_decomposition: Backport bugfix of Jama 1.0.3

[rubyspec:df87040be371]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
marcandre 2013-01-13 21:06:39 +00:00
parent c12d66f0d1
commit 93f023feae
2 changed files with 9 additions and 8 deletions

View file

@ -1,3 +1,8 @@
Mon Jan 14 06:06:03 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* lib/matrix/eigenvalue_decomposition: Backport bugfix of Jama 1.0.3
[rubyspec:df87040be371]
Sun Jan 13 16:45:00 2013 Zachary Scott <zachary@zacharyscott.net>
* ext/psych/yaml/scanner.c: Fix typos, patch by James Dabbs

View file

@ -659,14 +659,10 @@ class Matrix
q = @h[k+1][k-1]
r = (notlast ? @h[k+2][k-1] : 0.0)
x = p.abs + q.abs + r.abs
if (x != 0.0)
p /= x
q /= x
r /= x
end
end
if (x == 0.0)
break
next if x == 0
p /= x
q /= x
r /= x
end
s = Math.sqrt(p * p + q * q + r * r)
if (p < 0)