amath  1.8.5
Simple command line calculator
hvc.c File Reference

Haversed cosine function. More...

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

Go to the source code of this file.

Functions

double hvc (double x)
 Haversed cosine function. More...
 

Detailed Description

Haversed cosine function.

Definition in file hvc.c.

Function Documentation

◆ hvc()

double hvc ( double  x)

Haversed cosine function.

hvc(x) = (1+cos(x))/2

Definition at line 44 of file hvc.c.

References cos().

Referenced by RealNumber::HaVerCosine().

45 {
46  double a = cos(x);
47  double b = 1.0 + a;
48  double c = b / 2.0;
49  return c;
50 }
double cos(double x)
Cosine function.
Definition: cos.c:87
Here is the call graph for this function:
Here is the caller graph for this function: