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

Go to the source code of this file.

Functions

complex casinh (complex z)
 Inverse hyperbolic sine of complex number. More...
 

Function Documentation

◆ casinh()

complex casinh ( complex  z)

Inverse hyperbolic sine of complex number.

Inverse hyperbolic sine expressed using complex logarithms:

asinh(z) = log(z + sqrt(z*z + 1))
With branch cuts: -i INF to -i and i to i INF
Domain: -INF to INF
Range:  -INF to INF

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

Definition at line 47 of file casinh.c.

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

Referenced by ComplexNumber::HypArcSine().

48 {
49  // TODO: Fix branch cuts
50  complex one = cpack(1.0, 0.0);
51  complex a = cadd(cmul(z, z), one);
52  complex b = cadd(z, csqrt(a));
53  complex w = clog(b);
54  return w;
55 }
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 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: