Re: A question on Newton's Method
- From: "Ray Koopman" <koopman@xxxxxx>
- Date: 30 Mar 2005 22:40:58 -0800
David M wrote:
> [...] someone pointed out that using the quadratic equation is not
> exactly stable when it comes to computers. [...]
It should not be necessary to use Newton's method. Cancellation in
the usual quadratic formula can be avoided by recognizing that
-b +- sqrt(b^2 - 4ac) -2c
--------------------- = --------------------.
2a b +- sqrt(b^2 - 4ac)
If b is positive then get the two roots as
-b - sqrt(b^2 - 4ac) -2c
-------------------- and -------------------.
2a b + sqrt(b^2 - 4ac)
If b is negative then use
-b + sqrt(b^2 - 4ac) -2c
-------------------- and -------------------.
2a b - sqrt(b^2 - 4ac)
.
- References:
- A question on Newton's Method
- From: David M
- A question on Newton's Method
- Prev by Date: Re: Directional derivative using finite differences
- Next by Date: Re: A question on Newton's Method
- Previous by thread: A question on Newton's Method
- Next by thread: Re: A question on Newton's Method
- Index(es):