amath  1.8.5
Simple command line calculator
coth.c File Reference

Hyperbolic cotangent function. More...

#include "prim.h"
Include dependency graph for coth.c:

Go to the source code of this file.

Functions

double coth (double x)
 Hyperbolic cotangent function. More...
 

Detailed Description

Hyperbolic cotangent function.

Definition in file coth.c.

Function Documentation

◆ coth()

double coth ( double  x)

Hyperbolic cotangent function.

coth(x) = cosh(x)/sinh(x)

Definition at line 44 of file coth.c.

References cosh(), and sinh().

Referenced by RealNumber::HypCotangent().

45 {
46  double a, b, c;
47 
48  a = cosh(x);
49  b = sinh(x);
50 
51  if (TRIG_INEXACT(b))
52  {
53  return NAN;
54  }
55 
56  c = a / b;
57  return c;
58 }
double cosh(double x)
Hyperbolic cosine function.
Definition: cosh.c:83
double sinh(double x)
Hyperbolic sine function.
Definition: sinh.c:77
#define TRIG_INEXACT(x)
Definition: prim.h:48
#define NAN
Definition: mathr.h:53
Here is the call graph for this function:
Here is the caller graph for this function: