Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: phi div by 0 error

by perlaintdead (Scribe)
on Sep 01, 2013 at 21:01 UTC ( #1051862=note: print w/ replies, xml ) Need Help??


in reply to phi div by 0 error

heres my new shiny one if you are intersted. you might have to adjust the for loop if you don't want to wait a few hours

use strict; use warnings; use Math::BigFloat; use Math::BigInt; my @list; my $a = Math::BigInt->new(1); my $b = Math::BigInt->new(1); my $c = Math::BigInt->new(0); for(my $i = 0;$i < 1000;$i++){ $c = $a->badd($b); $a = $b; $b = $c; push @list, $c; } my $Evens = -2; my $Odds = -1; my $Interval = 2; for(my $i = 0;$i < ($#list/2);$i++){ $Odds += $Interval; $Evens += $Interval; my $x = Math::BigFloat->new($list[$Odds]); $x->bround(100000); print $x->bdiv($list[$Evens]); print "\n"; }


Comment on Re: phi div by 0 error
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1051862]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2015-07-07 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls