Path: news.mathworks.com!newsfeed-00.mathworks.com!newscon02.news.prodigy.net!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!j4g2000prf.googlegroups.com!not-for-mail
From:  Randy Poe <poespam-trap@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: significant digits
Date: Tue, 07 Aug 2007 06:45:07 -0700
Organization: http://groups.google.com
Lines: 20
Message-ID: <1186494307.483988.71420@j4g2000prf.googlegroups.com>
References: <f99qoe$h6e$1@fred.mathworks.com>
NNTP-Posting-Host: 192.35.37.20
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1186494308 907 127.0.0.1 (7 Aug 2007 13:45:08 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 7 Aug 2007 13:45:08 +0000 (UTC)
In-Reply-To: <f99qoe$h6e$1@fred.mathworks.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 squid.atl.lmco.com:3128 (squid/2.5.STABLE14)
Complaints-To: groups-abuse@google.com
Injection-Info: j4g2000prf.googlegroups.com; posting-host=192.35.37.20;
Bytes: 2065
Xref: news.mathworks.com comp.soft-sys.matlab:422755


On Aug 7, 9:06 am, "sunil vaidya" <sunil.vai...@gmail.com> wrote:
> i'm running a prog in matlab which uses two matrix
> inversions and one roots function. i have some inconsistency
> in my results. does matlab truncate numbers beyond 16
> significant digits? and if it does, is they any way around
> this problem----can the accuracy be increased or something?
> TIA

You could use the VPA tools to do your calculation
symbolically, in variable-precision arithmetic, but you will find
that slows down your calculation enormously.

Better, as people have said, to learn to deal with round-off error,
to use imprecision in your floating-point comparisons, to
expect "real" values to possibly have imaginary components
on the order of 10^-16, etc. This is part of numerical
computation, the price we pay for the computation power.

                    - Randy