Complex trig functions

Real valued sine, cosine, tangent about z = 0

The named only argument n must be at least 20 to agree with Python’s stdlib cmath for 0 |z| < 1.

Tip

For small |z| you can get away with smaller values of n to reduce the number of computations.

boring_math.special_functions.trigonometry.ctrig0.csin0(z: complex, /, n: int = depth) complex

Taylor expansion of sine about z = 0

param z:

Independent variable.

param n:

Terms in expansion, must have 2 ≤ n ≤ 84.

returns:

The value of sine(x) centered at z = 0.

Tip

Best if

  • n ≥ 20 when |z| ≤ 1

  • n ≥ 22 when |z| ≤ π

boring_math.special_functions.trigonometry.ctrig0.ccos0(z: complex, /, n: int = depth) complex

Taylor expansion of cosine about z = 0

param z:

Independent variable.

param n:

Terms in expansion, must have 2 ≤ n ≤ 84.

returns:

The value of cosine(z) centered at z = 0.

Tip

Best if

  • n ≥ 20 when |z| ≤ 1

  • n ≥ 22 when |z| ≤ π

boring_math.special_functions.trigonometry.ctrig0.ctan0(z: complex, /, n: int = depth) complex

Tangent centered about z = 0

param z:

Independent variable.

param n:

Terms in expansion, must have 2 ≤ n ≤ 84.

returns:

The value csin0(z)/ccos0(z) centered at z = 0.

Tip

Best if

  • n ≥ 20 when |z| ≤ 1

  • n ≥ 22 when |z| ≤ π

Complex valued sine, cosine, tangent

The named only argument n must be at least 22 to agree with the ones from stdlib cmath.

Tip

For 0 ≤ |z| < 1 you can get away with smaller n values to reduce the number of computations.

boring_math.special_functions.trigonometry.ctrig.csin(z: complex, /, n: int = depth) complex

Complex tangent

Complex sine valid for all z ∈ ℂ.

param z:

Independent variable.

param n:

Terms in expansion, must have 2 ≤ n ≤ 84.

returns:

Value of sine(z).

boring_math.special_functions.trigonometry.ctrig.ccos(z: complex, /, n: int = depth) complex

Complex cosine

Complex cosine valid for all z ∈ ℂ.

param z:

Independent variable.

param n:

Terms in expansion, must have 2 n 84.

returns:

Value of cosine(z).

boring_math.special_functions.trigonometry.ctrig.ctan(z: complex, /, n: int = depth) complex

Complex tangent

Complex tangent valid for all z ∈ ℂ.

param z:

Independent variable.

param n:

Terms in expansion, must have 2 ≤ n ≤ 84.

returns:

Value of tangent(z) via sine(z)/cosine(z).