Skip to main content

uniaccurate

Error-free transforms and accurate summation/dot-product for floating-point arithmetic — a Python binding over UniAccurate, a Nim library with a C ABI core.

Naive summation accumulates O(n) rounding error. uniaccurate gives you progressively stronger alternatives without leaving Python: pairwise (O(log n)), compensated (Kahan/Neumaier/Klein), and correctly-rounded (Shewchuk's adaptive-precision expansion, the Neal small superaccumulator) — plus the matching compensated and correctly-rounded dot products.

Install

pip install uniaccurate

Prebuilt wheels ship for Linux, macOS and Windows, CPython 3.9-3.13. No Nim or C toolchain needed at install time.

Quick start

import uniaccurate

s, e = uniaccurate.two_sum(1.0, 2e16)                # (2e16, 1.0) -- error recovered exactly
uniaccurate.kahan_sum([0.1] * 10)                    # 1.0
uniaccurate.shewchuk_sum([1.0, 1e100, 1.0, -1e100])  # 2.0, correctly rounded
uniaccurate.exact_dot([1.0, 2.0], [3.0, 4.0])        # 11.0, correctly rounded
uniaccurate.scaled_norm([3.0, 4.0])                   # 5.0

What's included

Category Functions
Error-free transform two_sum
Summation naive_sum, pairwise_sum, pairwise_sum_iterative
Compensated summation kahan_sum, neumaier_sum, klein_sum, sum_k
Correctly-rounded summation shewchuk_sum, exact_sum, oro_sum, acc_sum, near_sum
Dot product naive_dot, dot2, dot_k, exact_dot
Diagnostics condition_number
Statistical reductions scaled_mean, scaled_norm, centered_sum_squares, centered_cross_product, centered_cosine_similarity, centered_projection_coefficient

Every function raises TypeError on non-numeric input rather than silently coercing; see each docstring (help(uniaccurate.kahan_sum)) for the exact error/NaN/Inf behavior.

Development

Building from source (contributing, or a platform without a prebuilt wheel) needs a Nim toolchain — see CONTRIBUTING.md in the source repo.

nimble pyLib                                             # build the shared lib the extension links against
cd py && python3 setup.py build_ext --inplace            # build extension
cd py && python3 -m pytest -q                            # test

Metadata

Release files for uniaccurate 1.1.0

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

Source distribution (sdist)

Source distribution for uniaccurate 1.1.0
File Size Uploaded
uniaccurate-1.1.0.tar.gz 249.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for uniaccurate 1.1.0
File
uniaccurate-1.1.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
uniaccurate-1.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details
uniaccurate-1.1.0-cp314-cp314-macosx_26_0_arm64.macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64, macOS 10.15+ x86-64 Details
uniaccurate-1.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
uniaccurate-1.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
uniaccurate-1.1.0-cp313-cp313-macosx_26_0_arm64.macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64, macOS 10.13+ x86-64 Details
uniaccurate-1.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
uniaccurate-1.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
uniaccurate-1.1.0-cp312-cp312-macosx_26_0_arm64.macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 26.0+ ARM64, macOS 10.13+ x86-64 Details
uniaccurate-1.1.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
uniaccurate-1.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
uniaccurate-1.1.0-cp311-cp311-macosx_26_0_arm64.macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 26.0+ ARM64, macOS 10.9+ x86-64 Details
uniaccurate-1.1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
uniaccurate-1.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
uniaccurate-1.1.0-cp310-cp310-macosx_26_0_arm64.macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64, macOS 26.0+ ARM64 Details

Total release size: 5.3 MB

Release files / uniaccurate-1.1.0.tar.gz

Download URL uniaccurate-1.1.0.tar.gz
Size 249.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8bcb7643219afe3474063d0b67a94c590371a9ed1f6e7640ca6d7b7b930408f0
BLAKE2b-256 checksum
How to use checksums
187382dd5b3a8a43968982d55654402373ccb2ce76f12bf8dcf6b33495e68d8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp314-cp314-win_amd64.whl

Download URL uniaccurate-1.1.0-cp314-cp314-win_amd64.whl
Size 124.2 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
6f48bf4e8faaf7a43d0621fc8a1d8680139c1b8450f796f1fd099a876e030474
BLAKE2b-256 checksum
How to use checksums
16cd85ad5f19eee78caeb2b4486cd0ce5e0cc33b351fe75ae5b6da4e062c8537
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL uniaccurate-1.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 655.2 kB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8daf4bd8ffde12755b7a0dc38b31ed1d10c35cb6939c5d0308d6fb16003ebb01
BLAKE2b-256 checksum
How to use checksums
6ab8cded098e3964b1e425c62ff8c43ced1453f402a530ae706e8d2dbc9be612
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp314-cp314-macosx_26_0_arm64.macosx_10_15_x86_64.whl

Download URL uniaccurate-1.1.0-cp314-cp314-macosx_26_0_arm64.macosx_10_15_x86_64.whl
Size 231.4 kB
Tags CPython 3.14 macOS 10.15+ x86-64 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
a751685044e046d423e5f688f881c0f961a12945bd56ff047d3c9170e8a99cc9
BLAKE2b-256 checksum
How to use checksums
284ff2253dd1b8d5571eca47bd0fab2bbd919336785130402ad89297133b08ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp313-cp313-win_amd64.whl

Download URL uniaccurate-1.1.0-cp313-cp313-win_amd64.whl
Size 120.7 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
945b7b77340640ab435f7e9bc591278edb2d3f24c8fd7d8706fad04e2e19ccd4
BLAKE2b-256 checksum
How to use checksums
b4eb5c4f0c19543256f98051446ce4a8449f08861f7cf94dc95ae123a3587295
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL uniaccurate-1.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 659.5 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
bb232604eb1afd2e54199ca0bd8f3c606054615f05caeeb88ed7a57b2ed71d84
BLAKE2b-256 checksum
How to use checksums
57e193f5e6a09698cabf1698fb2ef28695c544d0c8cebc41f0ee97b3ac3a3ccd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp313-cp313-macosx_26_0_arm64.macosx_10_13_x86_64.whl

Download URL uniaccurate-1.1.0-cp313-cp313-macosx_26_0_arm64.macosx_10_13_x86_64.whl
Size 231.3 kB
Tags CPython 3.13 macOS 10.13+ x86-64 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
bf875a76a7374b580e6fec7155f688576a08532a820d03a446cdcf8d269e4c86
BLAKE2b-256 checksum
How to use checksums
899bca70cb1538476f288be2ef5c9f5c8d3bfa2390de156044405609083e61e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp312-cp312-win_amd64.whl

Download URL uniaccurate-1.1.0-cp312-cp312-win_amd64.whl
Size 120.7 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
37ef6e6c9baa55aed0ba76542af0d9e6ddcfed672b5fe5ffb571b0fbe7d3786e
BLAKE2b-256 checksum
How to use checksums
0a235af94b6ab5006dba83672d64db25e0d608c10498559ec1ad813417d07561
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL uniaccurate-1.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 663.3 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c41ed4929c2ba653668022c072fe756811b1fb78715fe2815dea3f00ded8e147
BLAKE2b-256 checksum
How to use checksums
cc67271fcb723924a72150d22b103826eb7ff3b8ea367e7c94b7e296ca492584
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp312-cp312-macosx_26_0_arm64.macosx_10_13_x86_64.whl

Download URL uniaccurate-1.1.0-cp312-cp312-macosx_26_0_arm64.macosx_10_13_x86_64.whl
Size 231.8 kB
Tags CPython 3.12 macOS 10.13+ x86-64 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
6bdf63970b08f91d54f511d881c8bc1ec3ebc770e27b2f0a999a0ce0937768b1
BLAKE2b-256 checksum
How to use checksums
b052be2325b7c38c1eeac8e00d10891e4b21602d3b6b1bba571230b7bc945b49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp311-cp311-win_amd64.whl

Download URL uniaccurate-1.1.0-cp311-cp311-win_amd64.whl
Size 116.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
c2bde56f38ea41ffa1a1b7dcc2bed12aed6f9c22ac9955351031f7f5b59c8c58
BLAKE2b-256 checksum
How to use checksums
411741a6dd242829e2958111dd8587ab5af734dc74e404a6c0fa5b22e6cc83c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL uniaccurate-1.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 678.2 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
aa79d22a8df1b759b46f15c7d30e7d75695ccf19e9a0118848ab9ea0126b6a81
BLAKE2b-256 checksum
How to use checksums
26a2c75baf973ecdf301d8a76fc0a6028b371737634f50f1e943aebd470e225a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp311-cp311-macosx_26_0_arm64.macosx_10_9_x86_64.whl

Download URL uniaccurate-1.1.0-cp311-cp311-macosx_26_0_arm64.macosx_10_9_x86_64.whl
Size 230.8 kB
Tags CPython 3.11 macOS 10.9+ x86-64 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
4cb1c65fdf4fe38750112651a670df597b26cebdcf2abee1cb1bfde045be844b
BLAKE2b-256 checksum
How to use checksums
91aed21cede00b83ed30709ce18e314e1ce04086dae552f06d7df01c37449b80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp310-cp310-win_amd64.whl

Download URL uniaccurate-1.1.0-cp310-cp310-win_amd64.whl
Size 116.8 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
f24390cf4ae16bddcc6b032743db34d7643348f31c371de2f395d24d3e6fd39f
BLAKE2b-256 checksum
How to use checksums
c886d4da4ffebc285dd93ff21b23a14077719db3fd6d6b52541fc4976110914f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL uniaccurate-1.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 649.4 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
dce2e2dc5033083fac1189b90e253081e40f38f52645b2cceb985efca83f6ac1
BLAKE2b-256 checksum
How to use checksums
f549909c369ece8416aa68c45a9013a8df8e48f15ea9f6a074274e2bb63add52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / uniaccurate-1.1.0-cp310-cp310-macosx_26_0_arm64.macosx_10_9_x86_64.whl

Download URL uniaccurate-1.1.0-cp310-cp310-macosx_26_0_arm64.macosx_10_9_x86_64.whl
Size 231.3 kB
Tags CPython 3.10 macOS 10.9+ x86-64 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
dddfdff740511ca980d016082d662c545d1161e38b7ab7ac0b6acdb1b0452672
BLAKE2b-256 checksum
How to use checksums
2d996764aff6148c80a0ec8259008a0c25704fabbdb22d8711cae0fba6abc917
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

16 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