equal_to_n_digits

equal_to_n_digits(x: float, y: float, numdigits: int = 7) bool[source]

Approximate equality check up to a given number of digits.

Parameters:
  • x -- First floating point number

  • y -- Second floating point number

  • numdigits -- Number of digits to check

Returns:

Boolean