Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2015-11-30 10:28 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (769 votes), past polls