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-stepcbrt), validated ≤ 1 ULP vs STRICT.
If the extension is unavailable, accurpy falls back to Python DD (slow but ≥ STRICT accuracy).
License
MIT
Project details
Release history Release notifications | RSS feed
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.4.tar.gz
(12.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file accurpy-0.1.4.tar.gz.
File metadata
- Download URL: accurpy-0.1.4.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5bb5c76e25d78f0a933c5c49db4010ec6b26adbd6db53789d735e8a6067323c
|
|
| MD5 |
8ce36b6e5132cacdf53ee461932926c6
|
|
| BLAKE2b-256 |
b4f3f32469c3147f3f2e3f20a2a10129aa6e4cc48fdf8bc0960f813c9a77a75f
|
File details
Details for the file accurpy-0.1.4-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: accurpy-0.1.4-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 25.6 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ab535c399e15b1c4fac66ef2735056b37c270df00c00617cb8866a2f28c48db
|
|
| MD5 |
22134a658a42109693e47b912c85899e
|
|
| BLAKE2b-256 |
0cec1bb484bec97d6a3fd4421c7b269d2fdd022b9b14340f719345343d26104b
|