amath  1.8.5
Simple command line calculator
cacsch.c File Reference
#include "prim.h"
Include dependency graph for cacsch.c:

Go to the source code of this file.

Functions

complex cacsch (complex z)
 Inverse hyperbolic cosecant of complex number. More...
 

Function Documentation

◆ cacsch()

complex cacsch ( complex  z)

Inverse hyperbolic cosecant of complex number.

Inverse hyperbolic cosecant expressed using complex logarithms:

acsch(z) = log(sqrt(1 + 1 / (z * z)) + 1/z)

More info is available at Wikipedia:
https://wikipedia.org/wiki/Inverse_hyperbolic_function#Logarithmic_representation

Definition at line 42 of file cacsch.c.

References cadd(), clog(), cmul(), cpack(), creci(), and csqrt().

Referenced by ComplexNumber::HypArcCosecant().

43 {
44  complex one = cpack(1.0, 0.0);
45  complex a = creci(cmul(z, z));
46  complex b = csqrt(cadd(one, a));
47  complex c = cadd(b, creci(z));
48  complex w = clog(c);
49  return w;
50 }
Definition: mathi.h:48
complex cmul(complex y, complex z)
Multiplication of two complex numbers.
Definition: prim.c:140
complex cpack(double x, double y)
Pack two real numbers into a complex number.
Definition: prim.c:68
complex csqrt(complex z)
Square root of complex number.
Definition: csqrt.c:42
complex cadd(complex y, complex z)
Addition of two complex numbers.
Definition: prim.c:120
#define one
Definition: ktan.c:67
complex creci(complex z)
Reciprocal value of complex number.
Definition: prim.c:181
complex clog(complex z)
Natural logarithm of a complex number.
Definition: clog.c:42
Here is the call graph for this function:
Here is the caller graph for this function: