diff options
Diffstat (limited to 'big.go')
-rw-r--r-- | big.go | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +package main + +import ( + "math/big" +) + +func BigPow(a,b int) *big.Int { + c := new(big.Int) + c.Exp(big.NewInt(int64(a)), big.NewInt(int64(b)), big.NewInt(0)) + + return c +} + +func Big(num string) *big.Int { + n := new(big.Int) + n.SetString(num, 0) + + return n +} + |