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

Go to the source code of this file.

Functions

complex ccosh (complex z)
 Hyperbolic cosine of a complex number. More...
 

Function Documentation

◆ ccosh()

complex ccosh ( complex  z)

Hyperbolic cosine of a complex number.

a+bi
real = cosh(a) * cos(b)
imag = sinh(a) * sin(b)

Definition at line 48 of file ccosh.c.

References cchsh(), cimag(), cos(), cpack(), creal(), and sin().

Referenced by ComplexNumber::HypCosine().

49 {
50  complex w;
51  double a, b;
52  double ch, sh;
53 
54  a = creal(z);
55  b = cimag(z);
56  cchsh(a, &ch, &sh);
57  w = cpack(cos(b) * ch, sin(b) * sh);
58 
59  return w;
60 }
double sin(double x)
Sine function.
Definition: sin.c:86
Definition: mathi.h:48
complex cpack(double x, double y)
Pack two real numbers into a complex number.
Definition: prim.c:68
double cimag(complex z)
Imaginary part of complex number.
Definition: prim.c:46
double cos(double x)
Cosine function.
Definition: cos.c:87
void cchsh(double x, double *c, double *s)
Calculate cosh and sinh.
Definition: prim.c:197
double creal(complex z)
Real part of complex number.
Definition: prim.c:38
Here is the call graph for this function:
Here is the caller graph for this function: