1)
Comparing the absolute of the difference with a quantity value (often denoted ε - small greek letter epsilon) is the common method:
diff = num1 - num2
if (abs(diff) <= epsilon)
# numbers are similar
else
# may use sign of diff here to check if larger or smaller
This method is also much faster than comparing rounded values.
2)
Additional digits are ignored. With your example, both values will be rounded to
12.3457
.