Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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"; }

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 browsing the Monastery: (9)
As of 2016-10-25 20:58 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (330 votes). Check out past polls.