in reply to number comparison with a twist

Try
if (abs(num1 - num2) < 1e-6) {.,.