almost_equal

Checks that two floating point values are equal to each other within tolerance in either relative or absolute terms (whichever is greater).

Inputs

first

First value to compare.

second

Second value to compare.

tolerance

Tolerance of the comparison.

Output

output

Returns true if the absolute value of the difference between the two values is smaller than or equal to the tolerance.