amath  1.8.5
Simple command line calculator
hv.c File Reference

Haversed sine function. More...

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

Go to the source code of this file.

Functions

double hv (double x)
 Haversed sine function. More...
 

Detailed Description

Haversed sine function.

Definition in file hv.c.

Function Documentation

◆ hv()

double hv ( double  x)

Haversed sine function.

hv(x) = (1-cos(x))/2

Definition at line 44 of file hv.c.

References cos().

Referenced by RealNumber::HaVerSine().

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: