Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Jacobian#isEqual
isEqual(a,b,zero=0.0,e=1.0e-8)
ext/bigdecimal/lib/bigdecimal/jacobian.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/ext/bigdecimal/lib/bigdecimal/jacobian.rb, line 30
def isEqual(a,b,zero=0.0,e=1.0e-8)
aa = a.abs
bb = b.abs
if aa == zero && bb == zero then
true
else
if ((a-b)/(aa+bb)).abs < e then
true
else
false
end
end
end
Determines the equality of two numbers by comparing to zero, or using the epsilon value