diff options
author | obscuren <obscuren@obscura.com> | 2013-12-26 19:45:52 +0800 |
---|---|---|
committer | obscuren <obscuren@obscura.com> | 2013-12-26 19:45:52 +0800 |
commit | 5db3335dce766bd679c54ea44f6df08a7ff74762 (patch) | |
tree | 75614c847fdc07150351e9aa02353d8f1d23196c /big.go | |
download | go-tangerine-5db3335dce766bd679c54ea44f6df08a7ff74762.tar go-tangerine-5db3335dce766bd679c54ea44f6df08a7ff74762.tar.gz go-tangerine-5db3335dce766bd679c54ea44f6df08a7ff74762.tar.bz2 go-tangerine-5db3335dce766bd679c54ea44f6df08a7ff74762.tar.lz go-tangerine-5db3335dce766bd679c54ea44f6df08a7ff74762.tar.xz go-tangerine-5db3335dce766bd679c54ea44f6df08a7ff74762.tar.zst go-tangerine-5db3335dce766bd679c54ea44f6df08a7ff74762.zip |
Initial commit
Diffstat (limited to 'big.go')
-rw-r--r-- | big.go | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 +} + |