Document the purpose of a helper module

This commit is contained in:
quaternic 2025-12-05 14:29:37 +02:00 committed by Trevor Gross
parent 21b89a9bf5
commit ec65d89176

View file

@ -1,5 +1,9 @@
/* SPDX-License-Identifier: MIT OR Apache-2.0 */
//! This module provides accelerated modular multiplication by large powers
//! of two, which is needed for computing floating point remainders in `fmod`
//! and similar functions.
//!
//! To keep the equations somewhat concise, the following conventions are used:
//! - all integer operations are in the mathematical sense, without overflow
//! - concatenation means multiplication: `2xq = 2 * x * q`