"kumar vishwajeet" <firstname.lastname@example.org> wrote in message news:email@example.com... > "Nasser M. Abbasi" wrote in message <firstname.lastname@example.org>... >> On 7/7/2014 8:26 PM, kumar vishwajeet wrote: >> > I want to find exp(N) where N can range from 0 to 200. >> >Is there any method to calculate it with good accuracy? >> >> as James said, you can use vpa >> >> vpa(exp(sym(200)),500) >> 7225973768125749258177477042189305697356874428527 >> 31928403269789123221909361473891661561.9265890625 >> 7055746840204310142941817711067711936822648098307 >> 7273278800877934252667473057807294372135876617806 >> 9702350324220401483115192088442120622525378469924 >> 9272881421981093552839024711140014485905504285329 >> 2850053281888896583514044902234770562940736477036 >> 9022153799888245922895391403712478563813079673045 >> 5316370477078232246232166391756343572294659379732 >> 9550687822348546666476886365318979823972170480437 >> 40943587594 >> >> But you have to do all the rest of the computation >> is syms land, otherwise what is the point of >> getting this accuracy if you can't use it in >> numerical matlab. >> >> >> > Actually I have a matrix whose elements range from exp(200) to exp(-200).
Is your matrix a double precision matrix or a symbolic matrix?
>The matrix is ill conditioned with conditioning number of 10^167.
So ... if you're doing ANYTHING in double precision with this matrix, you're getting garbage.
"As a general rule of thumb, if the condition number is 10^k , then you may lose up to k digits of accuracy on top of what would be lost to the numerical method due to loss of precision from arithmetic methods." [replaced images with text.]
By this guideline, you're losing roughly 167 digits of accuracy for the numbers you know to roughly 16 digits.
That looks like you're trying to perform the computations in double precision, in which case I would try not to have anything to do with this matrix at all.
What is the underlying problem that you're trying to use this problem to solve? There may be a way to solve that problem that doesn't require creating a matrix whose elements span 200+ orders of magnitude.