amath  1.8.5
Simple command line calculator
sech.c File Reference

Hyperbolic secant function. More...

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

Go to the source code of this file.

Functions

double sech (double x)
 Hyperbolic secant function. More...
 

Detailed Description

Hyperbolic secant function.

Definition in file sech.c.

Function Documentation

◆ sech()

double sech ( double  x)

Hyperbolic secant function.

sech(x) = 1/cosh(x)

Definition at line 44 of file sech.c.

References cosh().

Referenced by RealNumber::HypSecant().

45 {
46  double a = cosh(x);
47  if (TRIG_INEXACT(a))
48  {
49  return NAN;
50  }
51  return 1.0 / a;
52 }
double cosh(double x)
Hyperbolic cosine function.
Definition: cosh.c:83
#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: