amath  1.8.5
Simple command line calculator
vcs.c File Reference

Versed cosine function. More...

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

Go to the source code of this file.

Functions

double vcs (double x)
 Versed cosine function. More...
 

Detailed Description

Versed cosine function.

Definition in file vcs.c.

Function Documentation

◆ vcs()

double vcs ( double  x)

Versed cosine function.

vercos = 1+cos(x)
       = 2*cos(x/2)*cos(x/2)

Definition at line 45 of file vcs.c.

References cos().

Referenced by RealNumber::VerCosine().

46 {
47  double a = x / 2.0;
48  double b = cos(a);
49  double c = 2 * b * b;
50  return c;
51 }
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: