// ---
// tags: nebu, rust
// crystal-type: source
// crystal-domain: comp
// ---
//! Batch inversion via Montgomery's trick.
//!
//! Inverts N elements with 1 inversion + 3(N-1) multiplications.
use crateGoldilocks;
/// Batch-invert `a` into `result`. Both slices must have the same length.
/// All elements of `a` must be non-zero.
///
/// Uses `result` as scratch space for prefix products.
/// Batch-invert with zero handling. Zero inputs produce zero outputs.
nebu/rs/batch.rs
ฯ 0.0%