12.6.2.1640 F~ f-proximate FLOATING EXT

( -- flag ) ( F: r1 r2 r3 -- ) or ( r1 r2 r3 -- flag )

If r3 is positive, flag is true if the absolute value of (r1 minus r2) is less than r3.

If r3 is zero, flag is true if the implementation-dependent encoding of r1 and r2 are exactly identical (positive and negative zero are unequal if they have distinct encodings).

If r3 is negative, flag is true if the absolute value of (r1 minus r2) is less than the absolute value of r3 times the sum of the absolute values of r1 and r2.

See:

Rationale:

This provides the three types of "floating point equality" in common use — "close" in absolute terms, exact equality as represented, and "relatively close".

ContributeContributions

agsbavatar of agsb [390] Change F~ to F~= Comment2025-07-30 19:25:54

Rationale:

The word F~ may be confuse (with), as to perform bitwise complement (also known as one's complement) on its operand.

Just change to F~= for clarification, as to approximate value on this operand.

Reply New Version