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

Functions

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

Detailed Description

Function Documentation

◆ a_poly_eval()

double a_poly_eval ( double const * a,
size_t n,
double 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()

double a_poly_evar ( double const * a,
size_t n,
double 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. \]