aboutsummaryrefslogtreecommitdiffstats
path: root/big.go
diff options
context:
space:
mode:
authorobscuren <obscuren@obscura.com>2013-12-29 08:36:59 +0800
committerobscuren <obscuren@obscura.com>2013-12-29 08:36:59 +0800
commita1c5d5acac542ab877aeec7814338e7638d55dbf (patch)
treec194057a1662326dc17424b09c6c986c9cfd4669 /big.go
parent5198b7b9ebdfe1ef99627dadb07b87e18a039972 (diff)
downloadgo-tangerine-a1c5d5acac542ab877aeec7814338e7638d55dbf.tar
go-tangerine-a1c5d5acac542ab877aeec7814338e7638d55dbf.tar.gz
go-tangerine-a1c5d5acac542ab877aeec7814338e7638d55dbf.tar.bz2
go-tangerine-a1c5d5acac542ab877aeec7814338e7638d55dbf.tar.lz
go-tangerine-a1c5d5acac542ab877aeec7814338e7638d55dbf.tar.xz
go-tangerine-a1c5d5acac542ab877aeec7814338e7638d55dbf.tar.zst
go-tangerine-a1c5d5acac542ab877aeec7814338e7638d55dbf.zip
Comments
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)