polyroot_NR: Find one real polynomial root using Newton-Raphson method.

View source: R/MixtureFitting.R

polyroot_NRR Documentation

Find one real polynomial root using Newton–Raphson method.

Description

Finds one real polynomial root using Newton–Raphson method, implemented according to Wikipedia.

Usage

    polyroot_NR( p, init = 0, epsilon = 1e-6, debug = FALSE, implementation = "C" )

Arguments

p

vector of polynomial coeficients.

init

initial value.

epsilon

tolerance threshold for convergence.

debug

flag to turn the debug prints on/off.

implementation

flag to switch between C (default) and R implementations.

Value

Real polynomial root.

Author(s)

Andrius Merkys

References

Users of Wikipedia. Newton's method. https://en.wikipedia.org/w/index.php?title=Newton%27s_method&oldid=710342140


merkys/MixtureFitting documentation built on Feb. 26, 2023, 5:21 p.m.