diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-16 21:28:33 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-16 21:28:33 +0800 |
commit | 702218008ee2b6d708d6b2821cdef80736bb3224 (patch) | |
tree | d55ff7ce88187082378e7d8e4c2f3aad14d23b4e /Godeps/_workspace/src/github.com/ethereum/serpent-go/serpent/bignum.h | |
parent | 202362d9258335c695eb75f55f4be74a50a1af33 (diff) | |
download | go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar.gz go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar.bz2 go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar.lz go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar.xz go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.tar.zst go-tangerine-702218008ee2b6d708d6b2821cdef80736bb3224.zip |
Add versioned dependencies from godep
Diffstat (limited to 'Godeps/_workspace/src/github.com/ethereum/serpent-go/serpent/bignum.h')
-rw-r--r-- | Godeps/_workspace/src/github.com/ethereum/serpent-go/serpent/bignum.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/ethereum/serpent-go/serpent/bignum.h b/Godeps/_workspace/src/github.com/ethereum/serpent-go/serpent/bignum.h new file mode 100644 index 000000000..99571acd2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ethereum/serpent-go/serpent/bignum.h @@ -0,0 +1,41 @@ +#ifndef ETHSERP_BIGNUM +#define ETHSERP_BIGNUM + +const std::string nums = "0123456789"; + +const std::string tt256 = +"115792089237316195423570985008687907853269984665640564039457584007913129639936" +; + +const std::string tt256m1 = +"115792089237316195423570985008687907853269984665640564039457584007913129639935" +; + +const std::string tt255 = +"57896044618658097711785492504343953926634992332820282019728792003956564819968"; + +const std::string tt176 = +"95780971304118053647396689196894323976171195136475136"; + +std::string unsignedToDecimal(unsigned branch); + +std::string decimalAdd(std::string a, std::string b); + +std::string decimalMul(std::string a, std::string b); + +std::string decimalSub(std::string a, std::string b); + +std::string decimalDiv(std::string a, std::string b); + +std::string decimalMod(std::string a, std::string b); + +std::string decimalModExp(std::string b, std::string e, std::string m); + +bool decimalGt(std::string a, std::string b, bool eqAllowed=false); + +unsigned decimalToUnsigned(std::string a); + +#define utd unsignedToDecimal +#define dtu decimalToUnsigned + +#endif |