~ ( x y epsilon -- ? )
Factor handbook » The language » Numbers » Mathematical functions » Arithmetic functions

Prev:round-to-step ( x step -- y )


Vocabulary
math.functions

Inputs
xa real
ya real
epsilona real


Outputs
?a boolean


Word description
Tests if x and y are approximately equal to each other. There are three possible comparison tests, chosen based on the sign of epsilon:
epsilon is zero: exact comparison.
epsilon is positive: absolute distance test.
epsilon is negative: relative distance test.


Definition