diff options
author | obscuren <obscuren@obscura.com> | 2013-12-29 08:36:59 +0800 |
---|---|---|
committer | obscuren <obscuren@obscura.com> | 2013-12-29 08:36:59 +0800 |
commit | a1c5d5acac542ab877aeec7814338e7638d55dbf (patch) | |
tree | c194057a1662326dc17424b09c6c986c9cfd4669 /big.go | |
parent | 5198b7b9ebdfe1ef99627dadb07b87e18a039972 (diff) | |
download | go-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.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |