From f0b95d0f0a8f97aa90abe33d2ffdaf5638cea685 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 8 Apr 2023 18:46:47 +0900 Subject: [PATCH] Use KaTeX for modint --- src/modint.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modint.rs b/src/modint.rs index 956c440..f04cd8f 100644 --- a/src/modint.rs +++ b/src/modint.rs @@ -66,7 +66,7 @@ pub type ModInt1000000007 = StaticModInt; pub type ModInt998244353 = StaticModInt; pub type ModInt = DynamicModInt; -/// Represents _ℤ/mℤ_ where _m_ is a constant value. +/// Represents $\mathbb{Z}/m\mathbb{Z}$ where $m$ is a constant value. /// /// Corresponds to `atcoder::static_modint` in the original ACL. /// @@ -249,7 +249,7 @@ pub trait Modulus: 'static + Copy + Eq { fn butterfly_cache() -> &'static LocalKey>>>; } -/// Represents _1000000007_. +/// Represents $1000000007$. #[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug)] pub enum Mod1000000007 {} @@ -265,7 +265,7 @@ impl Modulus for Mod1000000007 { } } -/// Represents _998244353_. +/// Represents $998244353$. #[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug)] pub enum Mod998244353 {} @@ -287,7 +287,7 @@ pub struct ButterflyCache { pub(crate) sum_ie: Vec>, } -/// Represents _ℤ/mℤ_ where _m_ is a dynamic value. +/// Represents $\mathbb{Z}/m\mathbb{Z}$ where $m$ is a dynamic value. /// /// Corresponds to `atcoder::dynamic_modint` in the original ACL. /// @@ -456,7 +456,7 @@ impl Id for DefaultId { } } -/// Pair of _m_ and _ceil(2⁶⁴/m)_. +/// Pair of $m$ and $\lceil 2^{64}/m \rceil$. pub struct Barrett { m: AtomicU32, im: AtomicU64, @@ -687,7 +687,7 @@ pub trait ModIntBase: /// A trait for `{StaticModInt, DynamicModInt, ModIntBase}::new`. pub trait RemEuclidU32 { - /// Calculates `self` _mod_ `modulus` losslessly. + /// Calculates `self` $\bmod$ `modulus` losslessly. fn rem_euclid_u32(self, modulus: u32) -> u32; }