# basic_float_math Module

## Interfaces

• ### private elemental function isclose_for_operator_real_dp(a, b) result(res)

Operator functions may only have two arguments.

#### Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: a
real(kind=dp), intent(in) :: b

• ### private elemental function isclose_for_operator_real_sp(a, b) result(res)

Operator functions may only have two arguments.

#### Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: a
real(kind=sp), intent(in) :: b

• ### private elemental function isclose_for_operator_complex_dp(a, b) result(res)

Operator functions may only have two arguments.

#### Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: a
complex(kind=dp), intent(in) :: b

• ### private elemental function isclose_for_operator_complex_sp(a, b) result(res)

Operator functions may only have two arguments.

#### Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(in) :: a
complex(kind=sp), intent(in) :: b

• ### private elemental function isclose_real_dp(a, b, atol, rtol) result(res)

@brief Compare floating point numbers for equality

@details The comparison is symmetric and decorrelates atol and rtol. A good discussion can be found here https://github.com/numpy/numpy/issues/10161

@param[in] a @param[in] b @param[in] atol The absolute tolerance. Defaults to 0. @param[in] rtol The relative tolerance. Defaults to 1e-9.

#### Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: a
real(kind=dp), intent(in) :: b
real(kind=dp), intent(in), optional :: atol
real(kind=dp), intent(in), optional :: rtol

• ### private elemental function isclose_real_sp(a, b, atol, rtol) result(res)

@brief Compare floating point numbers for equality

@details The comparison is symmetric and decorrelates atol and rtol. A good discussion can be found here https://github.com/numpy/numpy/issues/10161

@param[in] a @param[in] b @param[in] atol The absolute tolerance. Defaults to 0. @param[in] rtol The relative tolerance. Defaults to 1e-9.

#### Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: a
real(kind=sp), intent(in) :: b
real(kind=dp), intent(in), optional :: atol
real(kind=dp), intent(in), optional :: rtol

• ### private elemental function isclose_complex_dp(a, b, atol, rtol) result(res)

@brief Compare floating point numbers for equality

@details The comparison is symmetric and decorrelates atol and rtol. A good discussion can be found here https://github.com/numpy/numpy/issues/10161

@param[in] a @param[in] b @param[in] atol The absolute tolerance. Defaults to 0. @param[in] rtol The relative tolerance. Defaults to 1e-9.

#### Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: a
complex(kind=dp), intent(in) :: b
real(kind=dp), intent(in), optional :: atol
real(kind=dp), intent(in), optional :: rtol

• ### private elemental function isclose_complex_sp(a, b, atol, rtol) result(res)

@brief Compare floating point numbers for equality

@details The comparison is symmetric and decorrelates atol and rtol. A good discussion can be found here https://github.com/numpy/numpy/issues/10161

@param[in] a @param[in] b @param[in] atol The absolute tolerance. Defaults to 0. @param[in] rtol The relative tolerance. Defaults to 1e-9.

#### Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(in) :: a
complex(kind=sp), intent(in) :: b
real(kind=dp), intent(in), optional :: atol
real(kind=dp), intent(in), optional :: rtol

• ### private elemental function near_zero_real_dp(x, epsilon) result(res)

#### Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: x
real(kind=dp), intent(in), optional :: epsilon

• ### private elemental function near_zero_real_sp(x, epsilon) result(res)

#### Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: x
real(kind=dp), intent(in), optional :: epsilon

• ### private elemental function near_zero_complex_dp(x, epsilon) result(res)

#### Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: x
real(kind=dp), intent(in), optional :: epsilon

• ### private elemental function near_zero_complex_sp(x, epsilon) result(res)

#### Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(in) :: x
real(kind=dp), intent(in), optional :: epsilon

• ### private elemental function conjgt_real_dp(x) result(res)

#### Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: x

• ### private elemental function conjgt_real_sp(x) result(res)

#### Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: x

• ### private elemental function conjgt_complex_dp(x) result(res)

#### Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: x

• ### private elemental function conjgt_complex_sp(x) result(res)

#### Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(in) :: x

## Functions

### private elemental function isclose_real_dp(a, b, atol, rtol) result(res)

@brief Compare floating point numbers for equality

#### Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: a
real(kind=dp), intent(in) :: b
real(kind=dp), intent(in), optional :: atol
real(kind=dp), intent(in), optional :: rtol

### private elemental function isclose_for_operator_real_dp(a, b) result(res)

Operator functions may only have two arguments.

#### Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: a
real(kind=dp), intent(in) :: b

### private elemental function near_zero_real_dp(x, epsilon) result(res)

#### Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: x
real(kind=dp), intent(in), optional :: epsilon

### private elemental function isclose_real_sp(a, b, atol, rtol) result(res)

@brief Compare floating point numbers for equality

#### Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: a
real(kind=sp), intent(in) :: b
real(kind=dp), intent(in), optional :: atol
real(kind=dp), intent(in), optional :: rtol

### private elemental function isclose_for_operator_real_sp(a, b) result(res)

Operator functions may only have two arguments.

#### Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: a
real(kind=sp), intent(in) :: b

### private elemental function near_zero_real_sp(x, epsilon) result(res)

#### Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: x
real(kind=dp), intent(in), optional :: epsilon

### private elemental function isclose_complex_dp(a, b, atol, rtol) result(res)

@brief Compare floating point numbers for equality

#### Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: a
complex(kind=dp), intent(in) :: b
real(kind=dp), intent(in), optional :: atol
real(kind=dp), intent(in), optional :: rtol

### private elemental function isclose_for_operator_complex_dp(a, b) result(res)

Operator functions may only have two arguments.

#### Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: a
complex(kind=dp), intent(in) :: b

### private elemental function near_zero_complex_dp(x, epsilon) result(res)

#### Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: x
real(kind=dp), intent(in), optional :: epsilon

### private elemental function isclose_complex_sp(a, b, atol, rtol) result(res)

@brief Compare floating point numbers for equality

#### Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(in) :: a
complex(kind=sp), intent(in) :: b
real(kind=dp), intent(in), optional :: atol
real(kind=dp), intent(in), optional :: rtol

### private elemental function isclose_for_operator_complex_sp(a, b) result(res)

Operator functions may only have two arguments.

#### Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(in) :: a
complex(kind=sp), intent(in) :: b

### private elemental function near_zero_complex_sp(x, epsilon) result(res)

#### Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(in) :: x
real(kind=dp), intent(in), optional :: epsilon

### private elemental function conjgt_real_dp(x) result(res)

#### Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: x

### private elemental function conjgt_real_sp(x) result(res)

#### Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: x

### private elemental function conjgt_complex_dp(x) result(res)

#### Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: x

### private elemental function conjgt_complex_sp(x) result(res)

#### Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(in) :: x

None

### public elemental function is_nan(r)

#### Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: r