amath  1.6.2
Simple command line calculator
cacsch.c File Reference
#include "prim.h"
#include "math.h"
#include "complex.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

complex cacsch ( complex  z)

Inverse hyperbolic cosecant of complex number.

Version
1.0
Date
14/09/15

Inverse hyperbolic cosecant expressed using complex logarithms:

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

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

Definition at line 43 of file cacsch.c.

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

Referenced by ComplexNumber::HypArcCosecant().

44 {
45  complex one = cpack(1.0, 0.0);
46  complex a = creci(cmul(z, z));
47  complex b = csqrt(cadd(one, a));
48  complex c = cadd(b, creci(z));
49  complex w = clog(c);
50  return w;
51 }
complex csqrt(complex z)
Square root of complex number.
Definition: csqrt.c:46
complex cmul(complex a, complex z)
Multiplication of two complex numbers.
Definition: prim.c:150
complex cadd(complex a, complex z)
Addition of two complex numbers.
Definition: prim.c:128
complex creci(complex z)
Reciprocal value of complex number.
Definition: prim.c:193
complex clog(complex z)
Natural logarithm of a complex number.
Definition: clog.c:46
#define one
Definition: ktan.c:64
complex cpack(double x, double y)
Pack two real numbers into a complex number.
Definition: prim.c:71

Here is the call graph for this function:

Here is the caller graph for this function: