Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: To display big number in all digits form.
Date: Thu, 19 Mar 2009 19:41:01 +0000 (UTC)
Organization: University College Dublin
Lines: 115
Message-ID: <gpu74d$omv$1@fred.mathworks.com>
References: <gps84r$1e2$1@news.onet.pl> <gptja9$hml$1@news.onet.pl> <gptk8m$8jd$1@fred.mathworks.com> <gptkie$kcq$1@news.onet.pl> <gptlc9$ra8$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1237491661 25311 172.30.248.38 (19 Mar 2009 19:41:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 19 Mar 2009 19:41:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 87230
Xref: news.mathworks.com comp.soft-sys.matlab:526257


"John D'Errico" <woodchips@rochester.rr.com> wrote in message <gptlc9$ra8
> 
> http://www.mathworks.com/matlabcentral/fileexchange/22725
> 
> fib = vpi(zeros(1,1476));
> fib(1) = 1;
> fib(2) = 1;
> 
> for i = 3:1476
>    fib(i) = fib(i-1) + fib(i-2);
> end
> 
> fib(end)
> ans =
> 130698922376339931803631155380271983098392443907
> 412640726006659460192793070479231740288681087777
> 017721095463154979012276234322246936939647185366
> 706368489362660844147449941348462800922755818969
> 634743348982916424954062744135969865615407276492
> 410653721774590669544801490837649161732095972658
> 064630033793347171632                                                
> 
> John

John,

Your VP toolbox is a great addition to Matlab.

As a check I used GP/Pari which gave me the same result. The factorization took about 10 mins on a 2x4 Xeon 5345 at 2.33GHz.


                                 GP/PARI CALCULATOR Version 2.3.4 (released)
                          i686 running cygwin (ix86/GMP-4.2.1 kernel) 32-bit version
                compiled: Jul 12 2008, gcc-3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
                               (readline v5.2 enabled, extended help available)

                                    Copyright (C) 2000-2006 The PARI Group


>>fibonacci(1476)
%1 =
130698922376339931803631155380271983098392443907
412640726006659460192793070479231740288681087777
017721095463154979012276234322246936939647185366
706368489362660844147449941348462800922755818969
634743348982916424954062744135969865615407276492
410653721774590669544801490837649161732095972658
064630033793347171632
>>factor(%1)
%2 =
[2 4]

[3 3]

[17 1]

[19 1]

[107 1]

[163 1]

[739 1]

[2789 1]

[8117 1]

[59369 1]

[199261 1]

[800483 1]

[3291481 1]

[4767481 1]

[32417387 1]

[350207569 1]

[370248451 1]

[7188487771 1]

[26024651929 1]

[67031206681 1]

[84738793193 1]

[9382599520669 1]

[18736753266019 1]

[55555922972483 1]

[68541957733949701 1]

[117838518633351469 1]

[46724505421882309671121 1]

[376254926106165750813409 1]

[3487500233390486612275910188300422239895080976898933124460035512511514601 1]

>>

Would anybody like to check the factorization?

Regards,

Derek O'Connor