Fine that it works for you now. For your equal test, I personally would never do it in that way, as with physics background we may work with really tiny values like plank constant (6 * 10^-34) and many more really small values.
Maybe better somethink like (a/b - 1.0).abs < 1e-12 Run I think I used something like that in my cdt module, but mratsim will know better... The idea is to not test abs difference, but relative.