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

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

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.

Links

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uniaccurate-1.0.0.tar.gz (129.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

uniaccurate-1.0.0-cp314-cp314-win_amd64.whl (55.7 kB view details)

Uploaded CPython 3.14Windows x86-64

uniaccurate-1.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (238.1 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

uniaccurate-1.0.0-cp314-cp314-macosx_26_0_arm64.macosx_10_15_x86_64.whl (91.0 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64macOS 26.0+ ARM64

uniaccurate-1.0.0-cp313-cp313-win_amd64.whl (54.0 kB view details)

Uploaded CPython 3.13Windows x86-64

uniaccurate-1.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (239.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

uniaccurate-1.0.0-cp313-cp313-macosx_26_0_arm64.macosx_10_13_x86_64.whl (90.7 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64macOS 26.0+ ARM64

uniaccurate-1.0.0-cp312-cp312-win_amd64.whl (54.1 kB view details)

Uploaded CPython 3.12Windows x86-64

uniaccurate-1.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (241.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

uniaccurate-1.0.0-cp312-cp312-macosx_26_0_arm64.macosx_10_13_x86_64.whl (90.8 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64macOS 26.0+ ARM64

uniaccurate-1.0.0-cp311-cp311-win_amd64.whl (53.9 kB view details)

Uploaded CPython 3.11Windows x86-64

uniaccurate-1.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (236.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

uniaccurate-1.0.0-cp311-cp311-macosx_26_0_arm64.macosx_10_9_x86_64.whl (92.3 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64macOS 26.0+ ARM64

uniaccurate-1.0.0-cp310-cp310-win_amd64.whl (53.7 kB view details)

Uploaded CPython 3.10Windows x86-64

uniaccurate-1.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (223.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

uniaccurate-1.0.0-cp310-cp310-macosx_26_0_arm64.macosx_10_9_x86_64.whl (92.4 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64macOS 26.0+ ARM64

uniaccurate-1.0.0-cp39-cp39-win_amd64.whl (53.7 kB view details)

Uploaded CPython 3.9Windows x86-64

uniaccurate-1.0.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (221.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

uniaccurate-1.0.0-cp39-cp39-macosx_26_0_arm64.macosx_10_9_x86_64.whl (92.7 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64macOS 26.0+ ARM64

File details

Details for the file uniaccurate-1.0.0.tar.gz.

File metadata

  • Download URL: uniaccurate-1.0.0.tar.gz
  • Upload date:
  • Size: 129.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for uniaccurate-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f700a7fb816c03e8db0c20cd0ef97e9f8616c55769815f24e98387d960f2b9c7
MD5 f31a092b7eaf525be5cf84aab17f6b91
BLAKE2b-256 80cf5546ba522c888549eaf22827f0d9317c2ef302395948fb84ac916d5e4aba

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0.tar.gz:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 576050b264fa5f3c29f78a99f086b5800981f2138ea5ed746963c58567c59276
MD5 b08d33522abadfaf1bd0b41349ed4a50
BLAKE2b-256 ef30c9bd88f1f34b210600253f67af319f8a388ffc1b2c453dba1ffad25c4c0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp314-cp314-win_amd64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 4bad6fc76be905d27d200a4c2a29c6f1ffa9b967e3a5cd42ecd6ce03b5e39783
MD5 24a23963a8a23308f0532ecd005eca89
BLAKE2b-256 6b203ff4654d50fa03ef728eca8198299724d0f9824da8dc7b7cb4375b4bbafe

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp314-cp314-macosx_26_0_arm64.macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp314-cp314-macosx_26_0_arm64.macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 102c885f96dc66fcc69c354f1ff0c15d1f1cbd9fe9ff996b26881e263a330ba2
MD5 317dac059166fba0dd0fffcba93692c0
BLAKE2b-256 0d82c4758305e0ad0e84218731806478c0a91cffbb92bf70710fa145cbefa92e

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp314-cp314-macosx_26_0_arm64.macosx_10_15_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d6982c880201393b276325305679fd0f4277bf459da01e4be56447c9628a04db
MD5 e42605f77dcdc68338ad95fdb25db678
BLAKE2b-256 2e9f0dfcc28845423be277153c88cfbd97ac9cacd2ef2eca1c154245af4df77e

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp313-cp313-win_amd64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 21bd3be697eaf91d20bcad78afe6c8cc8cacc7be836852f95f34c69517208c47
MD5 b54398cea599b68687174359554f3151
BLAKE2b-256 ba6ab0b531afe0ed186731cb46775dba4e40aaf6a4766229e6fc4be4a62f148c

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp313-cp313-macosx_26_0_arm64.macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp313-cp313-macosx_26_0_arm64.macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b20a6de2f86de4f6cbf0c7cda35734622f732291c10dbde3276b3beea252c2a6
MD5 e69e5af30d3b449167b98f94d3a01c3b
BLAKE2b-256 a54167d068c1ed1759d69833b1dc6d6a10ea178105525a95f41a47e17c4f6727

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp313-cp313-macosx_26_0_arm64.macosx_10_13_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 806071ea1917a1589c04198af20d719a06e788ba9fb1ca7c6914b1d89a2d66c5
MD5 8394e6b08b841e23a5aae1f0170c1abf
BLAKE2b-256 d68c84aa990bd3caeb7c97e8cb087bc0a2ab911abf710821e2d143f5e9096c9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp312-cp312-win_amd64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5b4ed85a64f3e831a9239788ad0b96bd998c8db2cc280d7fa8d52e80b0eab102
MD5 b7e253ee2ba7dd3f4494e81ccb5fc63d
BLAKE2b-256 c4b3168b913fadf9dd1eb1af53ac3a74189425a45eb5fe790a66585451da32cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp312-cp312-macosx_26_0_arm64.macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp312-cp312-macosx_26_0_arm64.macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1740f84d2001b9020494a9afacd722af4d1775d402b87b95785561fe272afeb4
MD5 c701a13b004fdffee899bb681125988a
BLAKE2b-256 3f82ef786425a4ff8480debdb62c82583128b55fbb251b79fea4bd5ac2d21e35

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp312-cp312-macosx_26_0_arm64.macosx_10_13_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 36e40401381861d3e0388b68f584b3714e934f0080bbcc5f4df9f332d75ecf6a
MD5 e230bbaeaff6e888f41a77bc96313ea9
BLAKE2b-256 fc5e88b0687fb09be0d7d26a8a6624ff1ad1f54a72305425d8bc96fbf1977fb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp311-cp311-win_amd64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 7b3f33c97a4d7f6abea2018f426061304332886d8499c2b60023b172c9cfc49a
MD5 ebccee3f159bcd1af9aff980fa81ee54
BLAKE2b-256 cf28e0932f76995c4aa08cb9e1b25910d21d6ac2f93340c2cf2c193ddf3b3349

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp311-cp311-macosx_26_0_arm64.macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp311-cp311-macosx_26_0_arm64.macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e728b75cf1f6129eac5c9a56ff035570fd24a4648d441febd3fd7a2ee5330dc1
MD5 3b88db9ac0b0e8905100c1200b98e43c
BLAKE2b-256 7365d43b5a7c8861ab89af8752634c38966453fe6996880f8b5d2ac65561ff87

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp311-cp311-macosx_26_0_arm64.macosx_10_9_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fe807a1a7ef5373c4dfc821b64ece638ce6005c74cb437d9741b21e5d8f920b9
MD5 e13d4ed85b5313ce939bbfae0d23d04e
BLAKE2b-256 c879c818c83efc3583afad0dded2046228afdfbd300bdef9e22fd1d67a2f28c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp310-cp310-win_amd64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c1914c555e678c43d554721b2daa4f3651a36528f105e20a0a6d27b3c811896c
MD5 ea7ae48206d96ed3de4f6b0d06b4543a
BLAKE2b-256 55d50fe9395cac0428aae484f949b6a3cb9886e4b454f898f0696d19e4ad7fb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp310-cp310-macosx_26_0_arm64.macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp310-cp310-macosx_26_0_arm64.macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4fc46ba03fc3321e0f560ea4826e732e960d6ec210bdcff1b7a3278b7380714e
MD5 73f20b81cb013cffa48f1f7945c0b7c9
BLAKE2b-256 2cda3b2f01a57fc08cdf93cfc03d0fbde06808fdd57c6685dd616857df797abb

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp310-cp310-macosx_26_0_arm64.macosx_10_9_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: uniaccurate-1.0.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 53.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for uniaccurate-1.0.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e3bc1ee5570e2fc46e0522cf467c2cfbb5e1a4fa9d04f2367b8e26d498f58f78
MD5 8cf424ff2f4a7eda322faaf8adea9890
BLAKE2b-256 7033ab36406bc035fcaa87e4e8973ddc3c098fde4e7174e166f5b34cd2d0513a

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp39-cp39-win_amd64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a80d637ea5df83f63d35cd5554a5e35536ab2237e3c4767c0a414c0b37dc60cf
MD5 55811ca8fa1646a4847e90bf24a364b1
BLAKE2b-256 a5b4170b27dd42fd6e743a530d3f1db95c2527334709f316f5a73fd57a9cad2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uniaccurate-1.0.0-cp39-cp39-macosx_26_0_arm64.macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for uniaccurate-1.0.0-cp39-cp39-macosx_26_0_arm64.macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 daf32e8bc14eb1cb0062ea030f7a5a833f187da3d64a65d1666f3cf1da448ef0
MD5 415cdc742d05103a9607810072aaa181
BLAKE2b-256 42b9dffd508aab82907b1a3ac528c6455ed23cae3fbd84dd85f7a68ba30cb390

See more details on using hashes here.

Provenance

The following attestation bundles were made for uniaccurate-1.0.0-cp39-cp39-macosx_26_0_arm64.macosx_10_9_x86_64.whl:

Publisher: release.yml on lituus-lab/UniAccurate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page