|
MPSolve 3.2.2
|
Horner implementation for Monomial polynomials. More...
Go to the source code of this file.
Functions | |
| MPS_BEGIN_DECLS void | mps_parhorner (mps_context *st, int n, mpc_t x, mpc_t p[], mps_boolean b[], mpc_t s, int n_thread) |
| void | mps_aparhorner (mps_context *st, int n, rdpe_t x, rdpe_t p[], mps_boolean b[], rdpe_t s, int n_thread) |
| void | mps_fhorner (mps_context *s, mps_monomial_poly *p, cplx_t x, cplx_t value) |
| Evaluate the polynomial p in the point x. | |
| void | mps_fhorner_with_error (mps_context *s, mps_monomial_poly *p, cplx_t x, cplx_t value, double *relative_error) |
| Evaluate the polynomial p in the point x, and give also a bound to the relative error occured in the computation. | |
| void | mps_dhorner (mps_context *s, mps_monomial_poly *p, cdpe_t x, cdpe_t value) |
| Evaluate the polynomial p in the point x. | |
| void | mps_dhorner_with_error (mps_context *s, mps_monomial_poly *p, cdpe_t x, cdpe_t value, rdpe_t relative_error) |
| Evaluate the polynomial p in the point x, and give also a bound to the relative error occured in the computation. | |
| void | mps_mhorner (mps_context *s, mps_monomial_poly *p, mpc_t x, mpc_t value) |
Compute the value of the polynomial p in the point x and save it in value. If you need a bound to the relative error, try mps_mhorner_with_error(). | |
| void | mps_mhorner_with_error (mps_context *s, mps_monomial_poly *p, mpc_t x, mpc_t value, rdpe_t relative_error, long int wp) |
Compute the value of the polynomial p in the point x and save it in value. | |
| void | mps_mhorner_with_error2 (mps_context *s, mps_monomial_poly *p, mpc_t x, mpc_t value, rdpe_t relative_error, long int wp) |
Compute the value of the polynomial p in the point x and save it in value. | |
Horner implementation for Monomial polynomials.
| void mps_dhorner | ( | mps_context * | s, |
| mps_monomial_poly * | p, | ||
| cdpe_t | x, | ||
| cdpe_t | value ) |
Evaluate the polynomial p in the point x.
| s | The mps_context of the computation. |
| p | The mps_monomial_poly to evaluate. |
| x | The point where the polynomial will be evaluated. |
| value | The value computed by the function. |
| void mps_dhorner_with_error | ( | mps_context * | s, |
| mps_monomial_poly * | p, | ||
| cdpe_t | x, | ||
| cdpe_t | value, | ||
| rdpe_t | error ) |
Evaluate the polynomial p in the point x, and give also a bound to the relative error occured in the computation.
| s | The mps_context of the computation. |
| p | The mps_monomial_poly to evaluate. |
| x | The point where the polynomial will be evaluated. |
| value | The value computed by the function. |
| error | A bound to the absolute error of the computation. |
| void mps_fhorner | ( | mps_context * | s, |
| mps_monomial_poly * | p, | ||
| cplx_t | x, | ||
| cplx_t | value ) |
Evaluate the polynomial p in the point x.
| s | The mps_context of the computation. |
| p | The mps_monomial_poly to evaluate. |
| x | The point where the polynomial will be evaluated. |
| value | The value computed by the function. |
| void mps_fhorner_with_error | ( | mps_context * | s, |
| mps_monomial_poly * | p, | ||
| cplx_t | x, | ||
| cplx_t | value, | ||
| double * | error ) |
Evaluate the polynomial p in the point x, and give also a bound to the relative error occured in the computation.
| s | The mps_context of the computation. |
| p | The mps_monomial_poly to evaluate. |
| x | The point where the polynomial will be evaluated. |
| error | A pointer to the location when an upper bound to the computation error will be stored. |
| value | The value computed by the function. |
| void mps_mhorner | ( | mps_context * | s, |
| mps_monomial_poly * | p, | ||
| mpc_t | x, | ||
| mpc_t | value ) |
Compute the value of the polynomial p in the point x and save it in value. If you need a bound to the relative error, try mps_mhorner_with_error().
| s | The mps_context of the computation. |
| p | The monomial_poly to evaluate. |
| x | The point where the polynomial will be evaluated. |
| value | The multiprecision complex variable where the result will be stored. |
| void mps_mhorner_with_error | ( | mps_context * | s, |
| mps_monomial_poly * | p, | ||
| mpc_t | x, | ||
| mpc_t | value, | ||
| rdpe_t | relative_error, | ||
| long int | wp ) |
Compute the value of the polynomial p in the point x and save it in value.
A upper bound to the relative error of the evaluation will be stored in relative_error.
| s | The mps_context of the computation. |
| p | The monomial_poly to evaluate. |
| x | The point where the polynomial will be evaluated. |
| value | The multiprecision complex variable where the result will be stored. |
| relative_error | The RDPE where the relative error will be saved. |
| wp | The working precision to use for the computation. If this value is 0 then s->mpwp will be used. |
| void mps_mhorner_with_error2 | ( | mps_context * | s, |
| mps_monomial_poly * | p, | ||
| mpc_t | x, | ||
| mpc_t | value, | ||
| rdpe_t | error, | ||
| long int | wp ) |
Compute the value of the polynomial p in the point x and save it in value.
A upper bound to the relative error of the evaluation will be stored in relative_error. The error is computed using the formula
![\[ n \frac{ap(|x|)}{|p(x)|} u
\]](form_36.png)
where 

| s | The mps_context of the computation. |
| p | The monomial_poly to evaluate. |
| x | The point where the polynomial will be evaluated. |
| value | The multiprecision complex variable where the result will be stored. |
| error | The RDPE where the absolute error will be saved. |
| wp | The working precision to use for the computation. If this value is 0 then s->mpwp will be used. |