Skip to main content

Ultra-accurate and fast double-double FM_new approximation with ≤1 ULP guarantees

Project description

accurpy

Ultra-accurate and fast double-double (106-bit) approximation for the new FM function. The C extension ships a single FMA-enabled pipeline validated to stay within 1 ULP versus high-precision references, and a pure-Python double-double fallback is provided when the extension is unavailable.

Install

pip install accurpy

Usage

import numpy as np
from accurpy import syncF

y = syncF(10.0, skip_exp=False)

x = np.geomspace(1e-12, 300.0, 1_000_000)
y_vec = syncF(x, skip_exp=True)

Notes

  • Scalar calls and NumPy arrays both dispatch to the fast C implementation when available.
  • When the extension cannot be imported, the package falls back to the same algorithm implemented in pure Python double-double arithmetic (slower, but numerically identical).

License

MIT

Project details


Download files

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

Source Distribution

accurpy-0.1.6.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

accurpy-0.1.6-cp313-cp313-win_amd64.whl (21.3 kB view details)

Uploaded CPython 3.13Windows x86-64

File details

Details for the file accurpy-0.1.6.tar.gz.

File metadata

  • Download URL: accurpy-0.1.6.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for accurpy-0.1.6.tar.gz
Algorithm Hash digest
SHA256 4821dd1f73b8d2d3c6c1728fde4470f8a662edfec8c5fec93ceb41449b9ba7a9
MD5 58ac7739d036ee01aaef8f024b3d190e
BLAKE2b-256 d1b6f25d7c48ff330060a9c9b59adad6e9287a4af3e1be9f01daaf36d381c934

See more details on using hashes here.

File details

Details for the file accurpy-0.1.6-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: accurpy-0.1.6-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for accurpy-0.1.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 43d1c8a2d196ae027c202bb4ff11b19d11948ef6fb9b0c1e373a63eeae72228a
MD5 295d2f19fcca53bc2a109e46517618cb
BLAKE2b-256 c79c8c3b79c6c47586c4230854d6b8659685a53efa47aa16d3b14244ab78039b

See more details on using hashes here.

Supported by

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