help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fixing a number at a certain precission?


From: veryhappy
Subject: Fixing a number at a certain precission?
Date: Thu, 3 Mar 2011 06:01:45 -0800 (PST)

I've a polynomial and i need to find the roots (that should be complex
conjugated pairs) and then use cplxpair to join each pair in second order
polynomials but i find that, due to rounding errors, roots aren't well
paired and cplxpair throw an error. I've tried to set a tol for cplxpair but
that makes imaginary numbers appear in the polynomials i want to find.
I've determinated that at least twelve decimal positions are correct so i
would like to fix the numbers i get at that precision. What's the best
method to do this? Multiply the number for 1e12 then fix it and lastly
divide by 1e12 or there's a better way?

--
View this message in context: 
http://octave.1599824.n4.nabble.com/Fixing-a-number-at-a-certain-precission-tp3333384p3333384.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]