PetscIsCloseAtTol — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscIsCloseAtTol

Returns whether the two `PetscReal` numbers are close at a given relative and absolute tolerances https://www.python.org/dev/peps/pep-0485/.

## Synopsis

    PetscBool PetscIsCloseAtTol(PetscReal a, PetscReal b, PetscReal rtol, PetscReal atol)

## Input Parameters

- a - first floating point number

- b - second floating point number

- rtol - relative tolerance

- atol - absolute tolerances

## See Also

`PetscIsCloseAtTolScalar()`, `PetscEqualReal()`, `PetscEqualScalar()`

## Level

beginner

## Location

src/sys/utils/mathclose.c

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages