Expand description
§ni-number
High-precision computation of the Ni constant (η_ν) — the quantum energy scattering constant.
§Definition
The Ni constant is defined by the series:
η_ν = Σ (n=1..∞) πⁿ / (n! · 2^(n²))Value: 1.88937666040491913115597775087642096081019761538215…
§Backends
| Feature | Backend | Requires | Precision |
|---|---|---|---|
backend-dashu | pure Rust | nothing (default) | arbitrary |
backend-rug | GNU MPFR | MSYS2 on Windows | arbitrary |
§Quick start
# Cargo.toml — pure Rust, works on every platform
[dependencies]
ni-number = "1.0"
# Maximum performance via GNU MPFR
ni-number = { version = "1.0", features = ["backend-rug"] }ⓘ
use ni_number::{NI_F64, ni_number_digits};
println!("η_ν ≈ {}", NI_F64); // fast — pre-computed constant
println!("η_ν = {}", ni_number_digits(100)); // 100 decimal digitsRe-exports§
pub use compute::digits_to_bits as bits_for_digits;pub use constants::NI_50_DIGITS;pub use constants::NI_F32;pub use constants::NI_F64;
Modules§
- backend
- Backend trait definitions for the Ni constant computation engine.
- cache
- Thread-safe cache for computed Ni constant values.
- compute
- Core algorithm for computing the Ni constant (η_ν).
- constants
- Pre-computed constants and formatting utilities for the Ni number.
- series
- Lazy iterator over the terms of the η_ν series.
Functions§
- clear_
cache - Clear the internal cache and free its memory.
- ni_
number - Compute η_ν to
precision_bitsof internal bit precision. - ni_
number_ digits - Compute η_ν and return a decimal string with
decimal_digitsdigits after the decimal point. - ni_
series - Return a lazy iterator over the individual series terms.