help-octave
[Top][All Lists]
Advanced

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

Re: Solving A*x=b when A is full rank but numerically rank deficient


From: CdeMills
Subject: Re: Solving A*x=b when A is full rank but numerically rank deficient
Date: Fri, 28 Jun 2013 01:57:20 -0700 (PDT)

PetrSt wrote
> 
> CdeMills wrote
>> Sorry to contradict you. I went one step further:
> I don't see any contradiction to what I wrote. In cotrary I think it
> proves it.
> As I understand to new lines:
> AAmp = AA+mp(0);   % convert AA to mp-class
> Bmp=AAmp*X;         % generate B as mp-class by precise calculation of
> AA*X
> AAinv=inv(AAmp.'*AAmp);
> x =  AAinv*(AAmp.'*Bmp);  % solve the linear system in least squares sence
> as x=inv(A'*A)*(A'*B), where all variables are of mp-class, i.e. variable
> (infinite) precision calculation.

In this case, mp is a class with a precision of 250 bits instead of the
usual 64 bits.

PetrSt wrote
> 
> CdeMills wrote
>> As you may notice, ALL the solutions are correctly computed in the second
>> case.
> It agrees with the last example ("infP calculation with infP B") in the
> "Ax_B_demo.m" send before, where even the Gauss's elimination gives
> desirable result x==X for square A.
> What I wanted to point out is necessity of knowing A and B precisely up to
> more than 35 digits to achieve all x with minimal precision around 1e-4.
> Bmp=AAmp*X surely satisfies this condition. If you are dealing with some
> theoretical modeling etc. and such precision is accesible for your design
> matrix and righthand side vector, then you don't need to read any further,
> since the variable prec. calculation solves the problem.
> I'm dealing with problems where A is represented by experimental
> conditions or literature values and B is some measured state variable, all
> obtained with some experimental error. In this case the idea of precisions
> higher than let say 15 orders is from the dreamworld. If it threats to
> your real calculations, you should examine the behaviour of solution with 
> Bmp = B + mp(0);    % conversion to mp-class of B obtined by double prec.
> computation of AA*X.
> Bmp = AAmp*X + randn(size(X)).*abserr;   % abserr = absolute error
> expectable for B (abserr~eps().*B~1e18 for the line above).
> 
> Regards
> Petr

I do not pretend I measure with THAT level of precision. I just have to deal
with equations mixing quantities whose RELATIVE accuracy are the same
(measurement at 1% say) but whose orders of magnitude  cover a range of
10^30. With only 64 bits of resolution, most of the terms in the
intermediate computations simply vanish due to truncation error. Stated in
another way, the numerical accuracy times the biggest value is greater than
the smaller values. With 250 bits of resolution, round-off error accumulates
at a level smaller than the absolute uncertainty on the smallest values, so
the relative accuracy of the final result is at least as good as the
relative accuracy of the input data.

Regards

Pascal 



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Solving-A-x-b-when-A-is-full-rank-but-numerically-rank-deficient-tp4653604p4654960.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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