Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ext/bigdecimal/lib/bigdecimal/jacobian.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# f.zero:: returns 0.0
# f.one:: returns 1.0
# f.two:: returns 1.0
# f.two:: returns 2.0
# f.ten:: returns 10.0
#
# f.eps:: returns the convergence criterion (epsilon value) used to determine whether two values are considered equal. If |a-b| < epsilon, the two values are considered equal.
Expand Down Expand Up @@ -53,6 +53,7 @@ def dfdxi(f,fx,x,i)
until ok>0 do
s = f.zero
deriv = []
nRetry += 1
if(nRetry>100) then
raise "Singular Jacobian matrix. No change at x[" + i.to_s + "]"
end
Expand Down
2 changes: 1 addition & 1 deletion ext/bigdecimal/lib/bigdecimal/newton.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# f.zero:: returns 0.0
# f.one:: returns 1.0
# f.two:: returns 1.0
# f.two:: returns 2.0
# f.ten:: returns 10.0
#
# f.eps:: returns the convergence criterion (epsilon value) used to determine whether two values are considered equal. If |a-b| < epsilon, the two values are considered equal.
Expand Down