diff options
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) |