E.V.E
v2023.02.15
Loading...
Searching...
No Matches

◆ newton()

***constexpr auto eve::newton ( )
constexprnoexcept

If \((c_i)_{0\le i\le n-1}\) denotes the coefficients of the polynomial by decreasing power order, and \((m_i)_{0\le i\le n-2}\) the nodes, the Newton scheme evaluates the polynom \(p\) at \(x\) using the following formula :

\(\qquad\displaystyle p(x) = (((c_0(x-m_0)+c_1)(x-m_1)+ ... )(x-m_{n-2}) + c_{n-1})\)

Header file

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
// Regular overloads
constexpr auto newton(floating_value auto x, floating_value auto ... cmi) noexcept; // 1
constexpr auto newton(floating_value auto x, eve::coefficients ci
eve::nodes auto ni) noexcept; // 2
// Lanes masking
constexpr auto newton<a href="*any of the above overloads*/" >conditional_expr auto c</a> noexcept; // 3
constexpr auto newton[logical_value auto m](*any of the above overloads
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:116
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:134
constexpr auto any
Computes a bool value which is true if and only if one or more elements of x evaluates to true.
Definition any.hpp:97
***constexpr auto newton() noexcept
Implement the Newton scheme to evaluate polynomials.
EVE Main Namespace.
Definition abi.hpp:19