Path: news.mathworks.com!not-for-mail
From: "Rick Rosson" <rrosson@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: significant digits
Date: Tue, 7 Aug 2007 09:16:46 -0400
Organization: The MathWorks, Inc.
Lines: 69
Message-ID: <f99rbv$10g$1@fred.mathworks.com>
References: <f99qoe$h6e$1@fred.mathworks.com> <f99r87$rff$1@fred.mathworks.com>
Reply-To: "Rick Rosson" <rrosson@mathworks.com>
NNTP-Posting-Host: rossonr.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1186492607 1040 144.212.206.185 (7 Aug 2007 13:16:47 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 7 Aug 2007 13:16:47 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
Xref: news.mathworks.com comp.soft-sys.matlab:422748


Typo:  it should say...

    b = f/y;

        instead of

    b = f/x;


Sorry.





"Rick Rosson" <rrosson@mathworks.com> wrote in message 
news:f99r87$rff$1@fred.mathworks.com...
>
> Hi Sunil,
>
> It's not so much that there is a fixed number of significant figures, but 
> rather that MATLAB (and almost all other computer languages) uses floating 
> point representations based on the IEEE standards.
>
> The absolute precision of a floating point variable depends on the 
> absolute magnitude of the variable's current value.  For example:
>
>    x = 1.5;
>    y = 1.5e-9;
>    e = eps(x);
>    f = eps(y);
>
> Notice that 'e' and 'f' are about 9 orders of magnitude apart.
>
> On the other hand, the relative precision is approximately constant:
>
>    a = e/x;
>    b = f/x;
>
> Notice that 'a' and 'b' are approximately equal.
>
>
> For more information, type
>
>   doc eps
>
> at the MATLAB command prompt.  Also, take a look at Technical Note 1108:
>
>   http://www.mathworks.com/support/tech-notes/1100/1108.html
>
>
> I hope that helps.  Thanks.
>
> Rick
>
>
>
> "sunil vaidya" <sunil.vaidya@gmail.com> wrote in message 
> news:f99qoe$h6e$1@fred.mathworks.com...
>> 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
>
>