Skip to content

Add function for equality with absolute/relative tolerance #281

Description

@PhilippImhof

It is often required to perform either types of tolerance check. Having to write abs(a - b) < abs_tol or abs(a - b) < rel_tol * max(abs(a), abs(b)) for every comparison can quickly become tedious.

It would therefore be convenient to have a function like Python’s math.isclose(a, b, rel_tol=1e-09, abs_tol=0.0).

Originally posted by @dbauer-ets in #208

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions