Metadata-Version: 2.4
Name: accurpy
Version: 0.2.1
Summary: Ultra-accurate and fast FM function evaluator with <4.5e-16 relative error
Author: AccurPy Authors
License-Expression: MIT
Project-URL: Homepage, https://github.com/accurpy/accurpy
Project-URL: Issues, https://github.com/accurpy/accurpy/issues
Project-URL: Source, https://github.com/accurpy/accurpy
Keywords: numerics,special functions,accuracy,FM function
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.20

# AccurPy

Ultra-accurate and fast FM function evaluator with <4.5e-16 relative error (~2x machine epsilon).

## Installation

```bash
pip install accurpy
```

## Usage

```python
from accurpy import syncF

# Compute FM(x) = exp(-x) * integral of t^(-1/2) * exp(-t) / (1 + t/x) dt
result = syncF(1.0)

# Skip the exp(-x) factor (returns FM(x) * exp(x))
result_scaled = syncF(1.0, skip_exp=True)

# Works with numpy arrays
import numpy as np
x = np.linspace(0.001, 100, 1000)
y = syncF(x)
```

## Performance

- C extension: ~10-20 nanoseconds per evaluation
- Pure Python fallback available when C extension cannot be built

## Accuracy

- Relative error < 4.5e-16 across entire domain (x > 0)
- Three-region algorithm:
  - Small x (< 1e-7): Cube-root expansion
  - Wide domain (1e-7 to 1e6): 63-segment rational approximation
  - Large x (> 1e6): Asymptotic expansion

## License

MIT
