aboutsummaryrefslogtreecommitdiffstats
path: root/big.go
diff options
context:
space:
mode:
Diffstat (limited to 'big.go')
-rw-r--r--big.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/big.go b/big.go
index 71e7573e1..44bfee2e4 100644
--- a/big.go
+++ b/big.go
@@ -4,6 +4,9 @@ import (
"math/big"
)
+/*
+ * Returns the power of two integers
+ */
func BigPow(a,b int) *big.Int {
c := new(big.Int)
c.Exp(big.NewInt(int64(a)), big.NewInt(int64(b)), big.NewInt(0))
@@ -11,6 +14,9 @@ func BigPow(a,b int) *big.Int {
return c
}
+/*
+ * Like big.NewInt(uint64); this takes a string instead.
+ */
func Big(num string) *big.Int {
n := new(big.Int)
n.SetString(num, 0)