liba 0.1.15
An algorithm library based on C/C++
 
Loading...
Searching...
No Matches
Collaboration diagram for polynomial:

Functions

void a_poly_swap (a_float *a, a_size n)
 swap between \( \sum_{i=0}^{n}a_{i}x^{i} \) and \( \sum_{i=0}^{n}a_{i}x^{n-i} \)
 
void a_poly_swap_ (a_float *a, a_float *b)
 
a_float a_poly_eval (a_float const *a, a_size n, a_float x)
 horner function for polynomial \( \sum_{i=0}^{n}a_{i}x^{i} \)
 
a_float a_poly_eval_ (a_float const *a, a_float const *b, a_float x)
 
a_float a_poly_evar (a_float const *a, a_size n, a_float x)
 horner function for polynomial \( \sum_{i=0}^{n}a_{i}x^{n-i} \)
 
a_float a_poly_evar_ (a_float const *a, a_float const *b, a_float x)
 

Detailed Description

Function Documentation

◆ a_poly_eval()

a_float a_poly_eval ( a_float const * a,
a_size n,
a_float x )

horner function for polynomial \( \sum_{i=0}^{n}a_{i}x^{i} \)

\[ \left\{\begin{array}{l} S_n = a_n\\ S_i = xS_{i+1} + a_i,\quad(i=n-1,n-2,\cdots,1,0)\\ P(x) = S_0 \end{array}\right. \]

◆ a_poly_evar()

a_float a_poly_evar ( a_float const * a,
a_size n,
a_float x )

horner function for polynomial \( \sum_{i=0}^{n}a_{i}x^{n-i} \)

\[ \left\{\begin{array}{l} S_0 = a_0\\ S_i = xS_{i-1} + a_i,\quad(i=1,2,\cdots,n-1,n)\\ P(x) = S_n \end{array}\right. \]