amath  1.6.2
Simple command line calculator
cacosh.c File Reference
#include "prim.h"
#include "math.h"
#include "complex.h"
Include dependency graph for cacosh.c:

Go to the source code of this file.

Functions

complex cacosh (complex z)
 Inverse hyperbolic cosine of complex number. More...
 

Function Documentation

complex cacosh ( complex  z)

Inverse hyperbolic cosine of complex number.

Version
1.1
Date
15/03/03

Inverse hyperbolic cosine expressed using complex logarithms:

acosh(z) = log(z + sqrt(z*z - 1))

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

Definition at line 43 of file cacosh.c.

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

Referenced by ComplexNumber::HypArcCosine().

44 {
45  complex one = cpack(1.0, 0.0);
46  complex a = csub(cmul(z, z) , one);
47  complex b = cadd(z, csqrt(a));
48  complex w = clog(b);
49  return w;
50 }
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 csub(complex a, complex z)
Subtraction of two complex numbers.
Definition: prim.c:139
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: