aboutsummaryrefslogtreecommitdiffstats
path: root/big.go
diff options
context:
space:
mode:
Diffstat (limited to 'big.go')
-rw-r--r--big.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/big.go b/big.go
new file mode 100644
index 000000000..71e7573e1
--- /dev/null
+++ b/big.go
@@ -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
+}
+