Logo

Programming-Idioms

History of Idiom 66 > diff from v4 to v5

Edit summary for version 5 by :

Version 4

2015-05-06, 21:04:51

Version 5

2015-07-31, 20:30:50

Idiom #66 Big integer exponentiation

Calculate the result z of x power n, where x is a big integer and n is a positive integer.

Idiom #66 Big integer exponentiation

Calculate the result z of x power n, where x is a big integer and n is a positive integer.

Imports
use bigint;
Code
my ($x, $y) = (3 ** 200, 25);
my $z = $x ** $y;