On this page
  1. cmath.isclose
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

cmath.isclose

Prev: cmath.exp | Up: cmath | Next: cmath.isfinite
Rel: cmath.acos, cmath.acosh, cmath.asin, cmath.asinh
Ref: docs.python.org — cmath.isclose
Tags: #public #python3 #stdlib #cmath


Import

import cmath
from cmath import isclose

Signature & Overview

cmath.isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0)

Determine whether two complex numbers are close in value.

Usage

import cmath

assert cmath.isclose(1 + 1e-12j, 1 + 0j, abs_tol=1e-9)

Gotchas

REPL Inspect

from cmath import isclose
help(isclose)

Linked from

Related notes