Skip to main content

Number.equals

equalsthatepsilon

Group: Logical

Documentation

Checks equality of numbers, using an epsilon value.

Arguments

  • that: The number to check equality against.
  • epsilon: The value by which self and that can be separated by before counting as not equal.

Examples

Check if 1 is equal to 1.0000001 within 0.001.

      1.equals 1.0000001 epsilon=0.001

Errors

If either of the arguments is Number.nan, an Incomparable_Values error is raised.