Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Strange interaction of bigint and foreach

by hdb (Prior)
on Apr 11, 2013 at 13:09 UTC ( #1028151=note: print w/replies, xml ) Need Help??


in reply to Re: Strange interaction of bigint and foreach
in thread Strange interaction of bigint and foreach

Very strange and dangerous... Some workarounds:

use strict; use warnings; use bigint; print "\nWith two foreach loops:\n\n"; for my $j (20 .. 22) { for my $i (12 .. 14) { print $i ** ($j+0), "\n"; } } print "\nWith two foreach loops:\n\n"; for my $j (20 .. 22) { for my $i (12 .. 14) { print (((0+$i) ** $j), "\n"); } } print "\nWith two foreach loops:\n\n"; for my $j (20 .. 22) { for my $i (12 .. 14) { print ((0+$i) ** ($j+0), "\n"); } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028151]
help
Chatterbox?
[stevieb]: I inhereted C#, so I had to become familiar with it pretty quickly. I am considering taking a crack at re-writing berrybrew in C++
[stevieb]: I haven't yet done the reserach needed to see if it's possible though

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2017-02-20 21:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (303 votes). Check out past polls.