fresnel

constexpr std::pair<Complex, Complex> fresnel(const Complex &z) noexcept

Evaluates the Fresnel integrals [1] for a complex input.

Parameters

const Complex &z

A complex number.

Returns

template<>
type std::pair<Complex, Complex>

A pair of complex numbers.

The Fresnel integrals are defined as:

\[\begin{split}S(z) = \int_{0}^{z}\sin(t^2)dt \\ C(z) = \int_{0}^{z}\sin(t^2)dt\end{split}\]

Example

Complex z = 1.0 + 1_j;
auto [S, C] = fresnel(z);
std::cout << S << "\n" << C << "\n";

Output:

-2.06189 + 2.06189j
2.55579 + 2.55579j

References