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

complex ccosh ( complex  z)

Hyperbolic cosine of a complex number.

Version
1.1
Date
2007/08/20
a+bi
real = cosh(a) * cos(b)
imag = sinh(a) * sin(b)

Definition at line 51 of file ccosh.c.

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

Referenced by ComplexNumber::HypCosine().

52 {
53  complex w;
54  double a, b;
55  double ch, sh;
56 
57  a = creal(z);
58  b = cimag(z);
59  cchsh(a, &ch, &sh);
60  w = cpack(cos(b) * ch, sin(b) * sh);
61 
62  return w;
63 }
void cchsh(double x, double *c, double *s)
Calculate cosh and sinh.
Definition: prim.c:210
double cos(double x)
Trigonometric cosine function.
Definition: cos.c:87
double sin(double x)
Trigonometric sine function.
Definition: sin.c:87
complex cpack(double x, double y)
Pack two real numbers into a complex number.
Definition: prim.c:71
double creal(complex z)
Real part of complex number.
Definition: prim.c:38
double cimag(complex z)
Imaginary part of complex number.
Definition: prim.c:47

Here is the call graph for this function:

Here is the caller graph for this function: