Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
go ahead... be a heretic
 
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 chanting in the Monastery: (11)
As of 2014-04-24 10:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (565 votes), past polls