MPSolve 3.2.1
Loading...
Searching...
No Matches
newton.h File Reference

Implementation of Newton correction computation. More...

Go to the source code of this file.

Functions

MPS_BEGIN_DECLS void mps_fnewton (mps_context *st, mps_polynomial *p, mps_approximation *root, cplx_t corr)
 Compute the Newton correction, i.e. and the value $s$ given by: More...
 
void mps_dnewton (mps_context *st, mps_polynomial *p, mps_approximation *root, cdpe_t corr)
 Compute the Newton correction, i.e. and the value $s$ given by: More...
 
void mps_mnewton (mps_context *st, mps_polynomial *p, mps_approximation *root, mpc_t corr, long int wp)
 Compute the Newton correction, i.e. and the value $s$ given by: More...
 

Detailed Description

Implementation of Newton correction computation.

Function Documentation

◆ mps_dnewton()

void mps_dnewton ( mps_context s,
mps_polynomial poly,
mps_approximation root,
cdpe_t  corr 
)

Compute the Newton correction, i.e. and the value $s$ given by:

\[
     nwt = \frac{p(z)}{p'(z)} \qquad s =
     \left\lvert \frac{p(\lvert z \rvert)}{p'(\lvert z \rvert)} \right\rvert
\]

and set the parameter cont to true if the newton correction is greater than $4n\epsilon s$ and to false otherwise.

This routine is the DPE version of mps_fnewton().

Parameters
sThe mps_context struct pointer.
polyThe polynomial to evaluate, casted to a mps_polynomial.
rootThe approximation where the newton fraction should be evaluated.
corrThe complex value of the newton correction.
See also
mps_fnewton()

◆ mps_fnewton()

MPS_BEGIN_DECLS void mps_fnewton ( mps_context s,
mps_polynomial poly,
mps_approximation root,
cplx_t  corr 
)

Compute the Newton correction, i.e. and the value $s$ given by:

\[
     nwt = \frac{p(z)}{p'(z)} \qquad s =
     \left\lvert \frac{p(\lvert z \rvert)}{p'(\lvert z \rvert)} \right\rvert
\]

and set the parameter cont to true if the newton correction is greater than $4n\epsilon s$ and to false otherwise.

Parameters
sThe mps_context struct pointer.
polyThe polynomial to evaluate, casted to a mps_polynomial.
rootThe approximation where the newton fraction should be evaluated.
corrThe complex value of the newton correction.

◆ mps_mnewton()

void mps_mnewton ( mps_context s,
mps_polynomial poly,
mps_approximation root,
mpc_t  corr,
long int  wp 
)

Compute the Newton correction, i.e. and the value $s$ given by:

\[
     nwt = \frac{p(z)}{p'(z)} \qquad s =
     \left\lvert \frac{p(\lvert z \rvert)}{p'(\lvert z \rvert)} \right\rvert
\]

and set the parameter cont to true if the newton correction is greater than $4n\epsilon s$ and to false otherwise.

This routine is the multiprecision version of mps_fnewton(). It differs from these routines, indeed, because it uses a more sophisticated tecnique to perform the computation:

  • If the polynomial are dense the computation is performed with the Horner's rule
  • If the polynomial is sparse then the computation is performed with the parallel Horner algorithm.
Parameters
sThe mps_context struct pointer.
polyThe polynomial to evaluate, casted to a mps_polynomial.
rootThe approximation where the newton fraction should be evaluated.
corrThe complex value of the newton correction.
wpSelect the working precision to use in the computation.
See also
mps_fnewton()
mps_dnewton()