On Mar 2, 10:21 am, Arthur Mc Coy <1984docmc...@gmail.com> wrote: > On Mar 2, 5:26 pm, Ben123 <ben.is.loca...@gmail.com> wrote: > > > > > > > > > > > On Mar 2, 9:04 am, Arthur Mc Coy <1984docmc...@gmail.com> wrote: > > > > What do you mean by "arbitrary precision" ? Each method of calculating > > > of something has its own precision... > > > If you are unfamiliar with arbitrary precision, I'm referring > > tohttp://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic > > > Suppose I find the eigenvalues of a matrix and the eigenvalues range > > from 1 to 0.0001. This can be handled by numpy in Python because the > > smallest eigenvalue is larger than then numerical precision of 1E-19. > > However, if the range of eigenvalues is 1 to 1E-40, then I will need > > to increase the precision of all calculations leading up to finding > > the eigenvalues. > > > I am working with complex valued matrices and I expect to get real > > eigenvalues back (based on the physics of the system). The precision > > of numpy is apparent from the imaginary component of the eigenvalues I > > find, currently 1E-19 or 1E-20. I need better precision for small > > eigenvalues. > > > In case you are curious, the complex-valued matrices are 20x20. > > > Thanks > > You probably have to change the method of finding eigenvalues. > Which one do you use? Power or algebraic ?
I'm not sure what you mean by this. As I mentioned, in Python I am using linalg.eig() from numpy on complex matrices. I have not investigated how this is implemented. > Do you use Gaussian method to simplify matrices ? No > > Languages can't support infinitely large or small numbers, so try to > multiply the inner variables by 10^n to increase their values if this > will not involve on the method. For example, I did this when was > calculating geometric means of computer benchmarks. Currently I have values between 1 and 1E-300 (not infinitely small). I don't see how scaling by powers of 10 will increase precision. > In such way you will be storing the number of zeros as n. Are you saying python cares whether I express a number as 0.001 or scaled by 10^5 to read 100? If this is the case, I'm still stuck. I need the full range of eigenvalues from 1 to 1E-300, so the entire range could be scaled by 1E300 but I would still need better precision than 1E19 > > Yes, interesting what are you calculating. -- http://mail.python.org/mailman/listinfo/python-list