Skip to main content

ni-number-py

PyPI - Python Version PyPI License: MIT

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.


What is the Ni Constant?

The Ni constant is defined by the series:

$$\eta_{\nu} = \sum_{n=1}^{\infty} \frac{\pi^n}{n! \cdot 2^{n^2}}$$

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


Installation

pip install ni-number-py

No system dependencies required. The package ships precompiled wheels for Windows, macOS, and Linux.


Usage

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)

API

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

Performance

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).



License

MIT — see LICENSE.

Metadata

Release files for ni-number-py 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ni-number-py 0.1.1
File Size Uploaded Provenance Actions
ni_number_py-0.1.1.tar.gz 10.3 kB Without provenance Details for ni_number_py-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ni-number-py 0.1.1
File Interpreter ABI Platform Actions
ni_number_py-0.1.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for ni_number_py-0.1.1-cp312-cp312-win_amd64.whl

Total release size: 717.0 kB

Release files / ni_number_py-0.1.1.tar.gz

Download URL ni_number_py-0.1.1.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
47d8ce986f117e3758152bcef6eac4aeb9d26f73cd499e8e56f4dc8308a5c728
BLAKE2b-256 checksum
How to use checksums
b6e927daa0854533c4a1b952500630c906d6943e225a525c5eccaa3e204d609b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Release files / ni_number_py-0.1.1-cp312-cp312-win_amd64.whl

Download URL ni_number_py-0.1.1-cp312-cp312-win_amd64.whl
Size 706.7 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f76b0aaf9df8ea0ca568dc16629c77f9183d9e03dda0b17613da3ce1777753ea
BLAKE2b-256 checksum
How to use checksums
a9817312d68dd80ae639ddd15edd0da1fcb70ab941cf5ca0828920cdaac8805a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.3

Security for ni-number-py 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page