Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!d30g2000prg.googlegroups.com!not-for-mail
From:  dbsearch04@yahoo.com
Newsgroups: comp.soft-sys.matlab
Subject: Re: precision of numbers?
Date: Mon, 09 Jul 2007 20:33:57 -0700
Organization: http://groups.google.com
Lines: 48
Message-ID: <1184038437.631814.11720@d30g2000prg.googlegroups.com>
References: <1183592720.093577.249820@x35g2000prf.googlegroups.com>
NNTP-Posting-Host: 71.204.139.71
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1184038438 5514 127.0.0.1 (10 Jul 2007 03:33:58 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 10 Jul 2007 03:33:58 +0000 (UTC)
In-Reply-To: <ef5c7e1.0@webcrossing.raydaftYaTP>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: d30g2000prg.googlegroups.com; posting-host=71.204.139.71;
Xref: news.mathworks.com comp.soft-sys.matlab:418124


Hello John:

Thanks for answering this question. I did not think that this was a
frivolous question. It is part of a Fibonacci speed computation
programming problem.

Since I am new to Matlab, I had no idea what vpa was/is. Subsequently,
I did find an example using vpa. In case anyone else needs this, here
is the code to do what I asked:

>> A=[0,1;1,1]
>> vA = vpa(A,30)
>> vA^10000

ans =

[ .20793608237133498072112648988638e2090, .
33644764876431783266621612005100e2090]
[ .33644764876431783266621612005100e2090, .
54438373113565281338734260993738e2090]

Finally, it must be related to precision, since the "fix" is to use
variable precision arithmetic.

Thanks again.

Regards..
--------------------------------------------------------------------------------------------
On Jul 4, 5:08 pm, "John D'Errico" <woodch...@rochester.rr.com> wrote:
>
> (This is not a precision question.)
>
> Could you do this, then someone else
> would be asking why they cannot compute
>
>   A^10000000000000
>
> or some arbitrarily higher power.
>
> If you truly need this, there is
> always the symbolic toolbox, using
> vpa.
>
> John- Hide quoted text -
>
> - Show quoted text -