Fresnel cos integral.

View versions (1)

Interface

#include <codecogs/maths/special/fresnel_cos.h>

using namespace Maths::Special;

Evaluates the cosine Fresnel integral.

C(x) = \int_0^x cos(\frac{\pi}{2} t^2) dt
(1)

\graph x=-4:4

The integral is evaluated by a power series for x < 1.

For x >= 1 auxiliary functions f(x) and g(x) are employed such that

S(x) = 0.5 - f(x) cos(\frac{\pi}{2} x^2) - g(x) sin(\frac{\pi}{2} x^2)
(2)

Accuracy:

<pre> Relative error. domain # trials peak rms 0, 10 10000 1.8e-15 3.3e-16 </pre>

Parameters

x
main input argument
GPL Licence — free for non commercial use. See Licence details.

Interactive Calculator

x
Result