Python bindings for ni-number — high-precision computation of the Ni constant (η_ν), the quantum energy scattering constant.
η_ν = 1.88937666040491913115597775087642096081019761538215...
Powered by Rust under the hood — no Rust installation required.
The Ni constant is defined by the series:
It represents the total amplitude of gauge-field attenuation at sub-Planckian distances, where interaction carriers leak into compactified extra dimensions (Calabi–Yau manifolds).
Author of the hypothesis: NiZaMinius
pip install ni-number-pyNo system dependencies required. The package ships precompiled wheels for Windows, macOS, and Linux.
import ni_number_py
# Fast f64 constant — precomputed, instant (~15 digits)
print(ni_number_py.NI_F64)
# 1.8893766604049191
# Fast f32 constant (~7 digits)
print(ni_number_py.NI_F32)
# 1.8893767
# First 50 digits — static string, instant
print(ni_number_py.ni_50_digits())
# 1.88937666040491913115597775087642096081019761538215
# Arbitrary precision — returns a string with n digits after the decimal point
print(ni_number_py.ni_digits(100))
# 1.8893766604049191311559777508764209608101976153821588...
# Clear the internal cache (frees memory after high-precision computation)
ni_number_py.clear()from decimal import Decimal
import ni_number_py
# Get 100 digits as string
ni_str = ni_number_py.ni_digits(100)
# Convert to Python's high-precision Decimal for math operations
ni_high_precision = Decimal(ni_str)| Function / Constant | Returns | Description |
|---|---|---|
NI_F64 |
float |
Precomputed constant at double precision (~15 digits) |
NI_F32 |
float |
Precomputed constant at single precision (~7 digits) |
ni_50_digits() |
str |
First 50 decimal digits, static string |
ni_digits(n) |
str |
Decimal string with n digits after the point, cached |
clear() |
None |
Free cached values from memory |
The series converges in fewer than 10 iterations for any practical precision level. Results are cached after the first call — subsequent calls at the same precision are instant.
Benchmarks measured on release build:
| Digits | First Computation (Cold Start) | Subsequent Calls (Cached / Hot) |
|---|---|---|
| 100 | ~25 ms | ~0.004 ms |
| 1 000 | ~1.5 s | ~0.003 ms |
| 5 000 | ~85 s | ~0.003 ms |
Note: For computations beyond 1,000 digits with faster cold start times, use the compiled ni-number-py-fast version (powered by the GMP/Rug backend).
- ni-number — the core Rust library
- Rust source
MIT — see LICENSE.