|
inlineconstexpr |
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})\)
Parameters
x
: real floating argument.ci
: tuple containing the coefficients by decreasing power order.cm
: tuple containing the nodes by decreasing power order.cmi...
: all the coefficients followed by all the nodes, both in decreasing power order. The total number of values is to be odd. If s is this number, the (s+1)/2 first are taken as the coefs and the others are the nodes. Note that the values of the cmi are not necessarily floating but the non floating ones are to be scalarc
: Conditional expression masking the operation.m
: Logical value masking the operation.Return value
x
is returned.fma[pedantic]
instead of fma
is used in internal computations.