Logo

Programming-Idioms

History of Idiom 66 > diff from v328 to v329

Edit summary for version 329 by programming-idioms.org:
[Elixir] Dead link: play.elixirbyexample.com has been down for a while

Version 328

2019-09-27, 03:26:14

Version 329

2019-10-14, 12:26:48

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.

Code
z = :math.pow(x, n)
Code
z = :math.pow(x, n)
Comments bubble
This returns a float, not exactly a big integer.
Comments bubble
This returns a float, not exactly a big integer.
Demo URL
http://play.elixirbyexample.com/s/0e112751a8