Skip to main content

BigIntegerCpp

CircleCI

A C++ port of the C# BigInteger class, with bindings for Python.

Building

The default configuration builds a shared library

mkdir build
cd build
cmake ..
cmake --build .

Build options

You can define various options during the configure stage to control the output

Var Default Comment
BIGINTEGER_BUILD_SHARED_LIB ON
BIGINTEGER_BUILD_STATIC_LIB OFF
BIGINTEGER_BUILD_TESTING OFF

Building the bindings

Read here.

Running the tests

Test can be ran as follows

cmake -D BUILD_TESTING=ON ..
cmake --build .
./tests/unit_tests

The output should be similar to

...

[ RUN      ] properties.RunMinusOneTests
[       OK ] properties.RunMinusOneTests (2 ms)
[----------] 3 tests from properties (7 ms total)
[----------] Global test environment tear-down
[==========] 117 tests from 22 test suites ran. (17481 ms total)
[  PASSED  ] 117 tests.

Including in your CMake project

The project can be included in 2 ways

add_subdirectory(BigIntegerCpp)

or if it has been installed via make install you can use

find_library(bigintegercpp)

It is possible to build both a SHARED and STATIC library simultaneously, as such 2 link targets exists to differentiate between them, respectively

BigIntegerCpp::BigIntegerCpp
BigIntegerCpp::BigIntegerCpp-static

To use in your target add

target_include_directories(your_target PUBLIC ${bigintegercpp_INCLUDE_DIRS})
target_link_libraries(your_target PRIVATE BigIntegerCpp::BigIntegerCpp)

Source.cpp

#include <bigintegercpp/BigInteger.h>

FAQ

  1. Why this project?

    It is purpose build for use in relationship to the NEO blockchain project. In order to create a compliant port of their virtual machine a need for a compliant BigInteger implementation exists. Any difference, in for example the modulo implementation, can result in VM execution deviation. This is just one of the many problems we've encountered after attemping to wrap Python's native int to produce identical behaviour.

  2. Should I use this project?

    If you have to ask this question, then no.

  3. How fast is it?

    We don't know. The focus has been on conformity to the C# BigInteger class, not on speed. If you want speed you might want to look at https://gmplib.org/

  4. Are there any known behavioural deviations from the C# implementation?

    The only known deviations are in the string parsing and conversion to string methods. Specifically, the overloads with IFormatProvider are not supported. Only base10 parsing is supported. String input may be prepended with + or -. Any whitespace is considered the end of the input.

    Deviations in any other parts are considered bugs. Please report them.

Release files for pybiginteger 1.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pybiginteger 1.3.5
File
pybiginteger-1.3.5-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
pybiginteger-1.3.5-cp314-cp314-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ x86-64 Details
pybiginteger-1.3.5-cp314-cp314-musllinux_1_2_aarch64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ ARM64 Details
pybiginteger-1.3.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
pybiginteger-1.3.5-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
pybiginteger-1.3.5-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
pybiginteger-1.3.5-cp314-cp314-macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.15+ x86-64 Details
pybiginteger-1.3.5-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pybiginteger-1.3.5-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details
pybiginteger-1.3.5-cp313-cp313-musllinux_1_2_aarch64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ ARM64 Details
pybiginteger-1.3.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
pybiginteger-1.3.5-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details
pybiginteger-1.3.5-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
pybiginteger-1.3.5-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details

Total release size: 6.1 MB

Release files / pybiginteger-1.3.5-cp314-cp314-win_amd64.whl

Download URL pybiginteger-1.3.5-cp314-cp314-win_amd64.whl
Size 138.8 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
15fa279a2b21e25012ecc169b308ef5292423d85152e5dfc49a922f255b823b3
BLAKE2b-256 checksum
How to use checksums
1c2a97788ac1cfe628aa3e71da525329a7927c5a090ce6963c5205a29906cf3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp314-cp314-musllinux_1_2_x86_64.whl

Download URL pybiginteger-1.3.5-cp314-cp314-musllinux_1_2_x86_64.whl
Size 1.2 MB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
10c733c43401d640bd7ab94dc9b8b72e40dabbdcd7cff331387daf9b8b71e393
BLAKE2b-256 checksum
How to use checksums
746cd15e8bbf71ceec7b921cb79f9db8501cfdfce1e37d77bad949036d85955b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp314-cp314-musllinux_1_2_aarch64.whl

Download URL pybiginteger-1.3.5-cp314-cp314-musllinux_1_2_aarch64.whl
Size 1.1 MB
Tags CPython 3.14 Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
6384942ebf74958aa351180018464c1eae84adbc33886c17d731e21c452ca8a0
BLAKE2b-256 checksum
How to use checksums
3010bb943c3de29bd77052dcbaa1e2a18a1317f631b7257db08e873eccbb895d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pybiginteger-1.3.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 162.6 kB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
43749677c5a104ddc01ae0f1c75f00d1ae6c426a48ec75bb8fa38d0dd91333c9
BLAKE2b-256 checksum
How to use checksums
be4a2a3765d149a71ecffe2982a037de2a8ec3df7367daf5fa6bb99426154484
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL pybiginteger-1.3.5-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 147.1 kB
Tags CPython 3.14 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
399a288ba547025d6b91691e33d039ee170d05c1e0a100a291b75ef1b620b1e3
BLAKE2b-256 checksum
How to use checksums
2eca9341a0827142a3394ebb79e1a6fae760e6dc52d05cc2fd643305127fdf8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp314-cp314-macosx_11_0_arm64.whl

Download URL pybiginteger-1.3.5-cp314-cp314-macosx_11_0_arm64.whl
Size 127.6 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ab6d4ac09212f3f61c0bccb8f0f162322508a3824bf71a5c0d0c77165bc97c10
BLAKE2b-256 checksum
How to use checksums
62e7cb1da9c7aab591adc2863fc7bc5e08be1fb2759c48172baf69f850763c86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp314-cp314-macosx_10_15_x86_64.whl

Download URL pybiginteger-1.3.5-cp314-cp314-macosx_10_15_x86_64.whl
Size 145.1 kB
Tags CPython 3.14 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
79f3e73dcb30d8f9598e4c62ddf273ad9354265c1775260482f6752f3b1a447c
BLAKE2b-256 checksum
How to use checksums
70a209f71f775a7ab37282ef109b4bc5f30d60226b7dba5a5000bba3b4522069
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp313-cp313-win_amd64.whl

Download URL pybiginteger-1.3.5-cp313-cp313-win_amd64.whl
Size 135.0 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
e67679f763f0bde009d78fe1c833c597847b52b8e4afb7e213793d6372788e98
BLAKE2b-256 checksum
How to use checksums
eaef5479c9ec667f117c5ca4b21da2257250e98d1f0978f6142c8006001205ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL pybiginteger-1.3.5-cp313-cp313-musllinux_1_2_x86_64.whl
Size 1.2 MB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
4a33c7878aac2167fae7b1675855521557654da11708ac611f1ab379a6c9fab0
BLAKE2b-256 checksum
How to use checksums
c3d963add8e1ff89ec6966a85202884c9e931c7f72384bf03caf38e3ca0c5f64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp313-cp313-musllinux_1_2_aarch64.whl

Download URL pybiginteger-1.3.5-cp313-cp313-musllinux_1_2_aarch64.whl
Size 1.1 MB
Tags CPython 3.13 Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
296b394d93f57db262050d7be6606ebac9b63555bffdd00912e13008fcf8faaa
BLAKE2b-256 checksum
How to use checksums
80d528231a183ecb11467e97de5bc1f528980ee46d5d8afbc736740454c16444
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pybiginteger-1.3.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 162.3 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
29f207e8a6ab8b18d415a8333ce129e805cd29237d7ba832e2d112ca2c102bb8
BLAKE2b-256 checksum
How to use checksums
188028e765e5f761fef0bff66bf16134eb6f320c64b28fef448c981161e13300
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL pybiginteger-1.3.5-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 146.8 kB
Tags CPython 3.13 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
f4d0fa63831cfd0b73f168c1c5f7cb807ce086f1989c87c113db2d5f7b536f08
BLAKE2b-256 checksum
How to use checksums
0780599ae4b697192ae21f377e911449b42fb65fd1cd7f5e0c5357271d2dfac7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp313-cp313-macosx_11_0_arm64.whl

Download URL pybiginteger-1.3.5-cp313-cp313-macosx_11_0_arm64.whl
Size 127.1 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d87ca59f636bb5cdd41a061d912d302914a383fb8fb61997db19bc3d23509ab3
BLAKE2b-256 checksum
How to use checksums
f49af9b80f5b53296b4bae09fbf020386309483bf9ced46aeed65805311a0c38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pybiginteger-1.3.5-cp313-cp313-macosx_10_13_x86_64.whl

Download URL pybiginteger-1.3.5-cp313-cp313-macosx_10_13_x86_64.whl
Size 144.5 kB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
d4cb1e181183963c9291e2135cdc63c846504ba9530baa5010f84441a1302d21
BLAKE2b-256 checksum
How to use checksums
76fa22bca3665fe647224cfe7fc92299c8e72c13f23218e6bf110dedf8f790e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

1.3.5 This release

14 release files

1.3.3

14 release files

1.3.2

14 release files

1.3.1

12 release files

1.3.0

8 release files

1.2.7

10 release files

1.2.6

4 release files

1.2.5

4 release files

1.2.4

4 release files

1.2.3

6 release files

1.2.2

6 release files

1.2.1

6 release files

1.2

6 release files

1.1

6 release files

1.0

7 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page