Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: To display big number in all digits form.
Date: Wed, 18 Mar 2009 22:32:12 -0400
Organization: The MathWorks, Inc.
Lines: 33
Message-ID: <gpsaqv$8s0$1@fred.mathworks.com>
References: <gps84r$1e2$1@news.onet.pl>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1237429920 9088 144.212.105.187 (19 Mar 2009 02:32:00 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 19 Mar 2009 02:32:00 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:526030



"ZikO" <zebik@op.pl> wrote in message news:gps84r$1e2$1@news.onet.pl...
> Hi
>
> I am afraid I have very unusual problem. I need to show a very very big 
> number, a Fibonacci(n) series when when n = 1476. It is number of 1.3e308 
> range. I would like to see this number with all digits. Is it somehow 
> possible in MATLAB.
>
> Thanks you.

No, when numbers become that large, the spacing between adjacent numbers is 
greater than 1, and so the same double-precision number will represent 
multiple "numbers with all digits".  Try:

x = 1.3e308;
thesame = false(1, 1000);
for k = 1:1000
    z = x+k;
    thesame(k) = isequal(x, z); % should return true
end
all(thesame)

This article talks about eps and the spacing between numbers, albeit dealing 
with small numbers.

http://www.mathworks.com/company/newsletters/news_notes/pdf/Fall96Cleve.pdf

-- 
Steve Lord
slord@mathworks.com