An open API service indexing awesome lists of open source software.

https://github.com/allemanfredi/eosio-biginteger

BigInteger implementation for EOSIO.cdt v1.6
https://github.com/allemanfredi/eosio-biginteger

blockchain cpp eosio eosio-biginteger

Last synced: over 1 year ago
JSON representation

BigInteger implementation for EOSIO.cdt v1.6

Awesome Lists containing this project

README

          

# eosio-biginteger

Refactoring of [this repo](https://github.com/playerone-id/biginteger-for-eosio) to be compatible with EOSIO.cdt v1.6.

## Original Author

Matt McCutchen ( [C++ Big Integer Library](https://mattmccutchen.net/bigint/) )

## Added Features

* __`addmod(a,b,c)`__ => (a + b) % c
* __`submod(a,b,c)`__ => (a - b) % c
* __`mulmod(a,b,c)`__ => (a * b) % c
* __`divmod(a,b,c)`__ => (a / b) % c = ((a mod c) * (b^(-1) mod c)) mod c

## Use

```c++
#include "BigIntegerLibrary.hpp"
#include
BigInteger a = 65536;
print("a * a * a * a * a * a * a * a: ", ( a * a * a * a * a * a * a * a ) );
```

## Build

```
eosio-cpp your_file_name.cpp eos_mem_wrapper.cpp BigInteger.cpp BigIntegerAlgorithms.cpp BigIntegerUtils.cpp BigUnsigned.cpp BigUnsignedInABase.cpp -o your_file_name.wasm
```