From ec65d89176827a8ff0e87ce553739bcae0a0265b Mon Sep 17 00:00:00 2001 From: quaternic <57393910+quaternic@users.noreply.github.com> Date: Fri, 5 Dec 2025 14:29:37 +0200 Subject: [PATCH] Document the purpose of a helper module --- library/compiler-builtins/libm/src/math/support/modular.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/compiler-builtins/libm/src/math/support/modular.rs b/library/compiler-builtins/libm/src/math/support/modular.rs index dbf1f0513a0d..e599ede0776e 100644 --- a/library/compiler-builtins/libm/src/math/support/modular.rs +++ b/library/compiler-builtins/libm/src/math/support/modular.rs @@ -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`