Post Reply 
Solve() gives wrong answer (r10077)
04-28-2016, 09:11 AM
Post: #11
RE: Solve() gives wrong answer (r10077)
(04-28-2016 06:54 AM)retoa Wrote:  Same problem with proot([0.04,-2.4,36])
the answer is [30-2.107e6i 30+2.107e-6i]

so we have an error in the order of 1e-6 with thew first coefficient in the order of 1e-2.

I find this error very big, also considering binary approximation.

Actually, this error is about the correct size. It comes from \( b^2-4ac \) being very slightly negative instead of zero. If \( b^2-4ac=-\epsilon \) then the imaginary part of the roots is \( \pm{\rm i}\sqrt\epsilon/2a \) and an error of \( \sim10^{-6} \) is understandable if \( \epsilon\sim10^{-12} \).

Nigel (UK)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Solve() gives wrong answer (r10077) - Nigel (UK) - 04-28-2016 09:11 AM



User(s) browsing this thread: 2 Guest(s)