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, with:

  • STRICT mode (≤ 1 ULP across a broad domain), mirroring a validated Python DD algorithm
  • OPT mode (FMA + 1-step cbrt), validated ≤ 1 ULP against STRICT on a dense 120k grid

Install

pip install accurpy

Usage

import numpy as np
from accurpy import approx_FM_new

y_strict = approx_FM_new(10.0, skip_exp=False, mode="strict")
y_opt    = approx_FM_new(10.0, skip_exp=False, mode="opt")

x = np.geomspace(1e-12, 300.0, 1_000_000)
y = approx_FM_new(x, skip_exp=True, mode="opt")

Modes

  • mode="strict" — full double-double path with exact operation order (≤ 1 ULP).
  • mode="opt" — faster path (FMA-based DD; 1-step cbrt), validated ≤ 1 ULP vs STRICT.

If the extension is unavailable, accurpy falls back to Python DD (slow but ≥ STRICT accuracy).

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.3.tar.gz (12.3 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.3-cp313-cp313-win_amd64.whl (25.5 kB view details)

Uploaded CPython 3.13Windows x86-64

File details

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

File metadata

  • Download URL: accurpy-0.1.3.tar.gz
  • Upload date:
  • Size: 12.3 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.3.tar.gz
Algorithm Hash digest
SHA256 a7714ab5150c101711e1e16699387c19f683fc533dd6d6a1611d138fda487df5
MD5 c33a0b61ef91caafd039ca1715818c5a
BLAKE2b-256 ee7cc8bb091f8c1c8d77a244a0b6ce5a74a0357e3d1a49ec648c6dfc0b9b311d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: accurpy-0.1.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 25.5 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.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f6dfe82c3d9791a4725157f62ddfa9bf4fc014a9ec2f2d2cc6cd724c4acba7b3
MD5 5d0b5bdb492399fa5d0dd89e250ee897
BLAKE2b-256 09e82b9a5ad6988292ad7a0947e474bc8e6680288c2a27edd45ab238d816fdfc

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