function equals( x, y )
if math.abs(x) >= 1000 and math.abs(y) >= 1000 then
eps = 10
elseif math.abs(x) >= 100 and math.abs(y) >= 100 then
eps = 5
elseif math.abs(x) >= 10 and math.abs(y) >= 10 then
eps = 1
else
eps = 0.1
end
return math.abs( x - y ) <= ( eps )
end
@pgimeno
Never heard of mantissa. Gonna read it now. Thanks for the heads up.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.