bitrep (Python)
Exact, order-invariant, bit-identical floating-point reductions and CRDTs —
a thin Python binding over the Rust bitrep
engine, so every result is the same across any machine, any merge order, any
sharding.
pip install bitrep
import bitrep
# Exact sum — naive float gives 0.0; this gives 1.0, and it's order-invariant.
s = bitrep.SumF64()
for x in (1e16, 1.0, -1e16):
s.add(x)
print(s.value()) # 1.0
# Exactly-rounded statistics
m = bitrep.MomentsF64()
for x in (2, 4, 4, 4, 5, 5, 7, 9):
m.add(x)
print(m.mean(), m.variance(), m.count()) # 5.0 4.0 8
# Receipt: same multiset -> same 32-byte hash, regardless of order.
print(s.state_hash().hex())
# CRDT map that converges without a coordinator
a = bitrep.SumMap(); a.add("k", 1.5); a.add("k", 2.5)
b = bitrep.SumMap(); b.add("k", 2.5); b.add("k", 1.5)
a.merge(b) # idempotent, order-invariant
What's included
Exact accumulators (SumF64, SumF32, FastSumF64), exact dot product
(DotF64, dot), convergent statistics (MomentsF64, Moments4F64 with
skewness/kurtosis, CovF64 regression, WeightedMomentsF64, PnMomentsF64
retractable, CovMatrixF64 multiple regression — with the v0.5 exact tier:
regression_exact() for correctly rounded coefficients and sub() for exact
downdating/unlearning, plus SumF64.try_unmerge), HistogramF64 (exact counts +
honest quantile bounds), ExtremaF64, signed receipts (state_hash), and the
CRDT layer (SumMap, MomentsMap, ReplicatedSum, DeltasSum).
The convergence laws of the core are machine-checked in Lean 4. See the main repository for proofs, the Rust crate, and the paper.
License: MIT OR Apache-2.0.
Metadata
Release files for bitrep 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bitrep-0.5.1.tar.gz | 179.3 kB | Without provenance | Details for bitrep-0.5.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| bitrep-0.5.1-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details for bitrep-0.5.1-cp38-abi3-win_amd64.whl |
| bitrep-0.5.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details for bitrep-0.5.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| bitrep-0.5.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ ARM64 | Details for bitrep-0.5.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| bitrep-0.5.1-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details for bitrep-0.5.1-cp38-abi3-macosx_11_0_arm64.whl |
| bitrep-0.5.1-cp38-abi3-macosx_10_12_x86_64.whl | CPython 3.8 | abi3 | macOS 10.12+ x86-64 | Details for bitrep-0.5.1-cp38-abi3-macosx_10_12_x86_64.whl |
Total release size: 2.0 MB
Release files / bitrep-0.5.1.tar.gz
| Download URL | bitrep-0.5.1.tar.gz |
|---|---|
| Size | 179.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f26eb5e9a80a0165c623d8c5f1591c787b444f0ee0da57e843bb387b9814a364
|
|
BLAKE2b-256 checksum How to use checksums |
524340ef73591f97ccb600742733fc76b4d9479e7f5197f2853d4f65e7908f5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / bitrep-0.5.1-cp38-abi3-win_amd64.whl
| Download URL | bitrep-0.5.1-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 279.7 kB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0b11e1f793b472f52df23a08f6941890bc0594c619c4cb1b2b2de634932b8c28
|
|
BLAKE2b-256 checksum How to use checksums |
856e298cf3ca582e1d4372b0e2a1990d45546d427575e3b6359ac739c36206fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / bitrep-0.5.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | bitrep-0.5.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 420.6 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
28e5b30f08b2983ba85b55a1cffa942b45a8ee2502defe604947bdc189cc2316
|
|
BLAKE2b-256 checksum How to use checksums |
a4f519b9d40167f57f4da75f156b3764e6eec4f22356d335c65c6cedb9f1e968
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / bitrep-0.5.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | bitrep-0.5.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 418.0 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
45b2b490c7573179712b6137cb6126d895205e728c0f799443f0123b2e8d1e88
|
|
BLAKE2b-256 checksum How to use checksums |
9ff04c2bd6b9d30794f8e0619c3b5a0a4422a91719c1e6e185d2db94cc9cb208
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / bitrep-0.5.1-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | bitrep-0.5.1-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 368.6 kB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c0c34b9f68638aae808992657a27fb7a5b2163a57bd98db96e4d2bcc443e45c5
|
|
BLAKE2b-256 checksum How to use checksums |
afcb85b4bf176f46494c6e02bc147a51acd73e06ba83e419e6a7614e0ba69bda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / bitrep-0.5.1-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | bitrep-0.5.1-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 375.1 kB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
f396d24e5638e8ba8339bd4e396cd47b006a1fc8e4480a62eb9ad49065acfc8a
|
|
BLAKE2b-256 checksum How to use checksums |
b9af12cfaad2963aea8f3b20047ffc59922503c0693fe954b5d7f8f9d2dc0470
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Security for bitrep 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.