constantApproximation

constexpr Complex constantApproximation(Complex (*f)(Complex), const Complex &z) noexcept

Evaluates the constant Taylor approximation of a complex function at a point \(z\) [1].

Parameters

Complex (*f)(Complex)

The function to approximate.

const Complex &z0

The complex point at which to center the approximation.

Returns

type Complex

A complex number.

This function simply returns the function \(f\) evaluated at a point \(z_0\), that is:

\[f(z) \approx f(z_0)\]

Example

auto fn = [](Complex z) { return sin(z); };
std::cout << constantApproximation(fn, 1 + 1_j) << "\n";

Output:

1.29846 + 0.634964j

References