From ac8ccca5bc99426a7c2031bfc4835443ae7c6cfb Mon Sep 17 00:00:00 2001 From: Salim Bou Date: Wed, 27 May 2026 19:41:37 +0100 Subject: [PATCH 1/3] Update numeral_systems.rs Add Arabic abjad numbering --- src/numeral_systems.rs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/numeral_systems.rs b/src/numeral_systems.rs index 39ce4ac..5f9d88e 100644 --- a/src/numeral_systems.rs +++ b/src/numeral_systems.rs @@ -408,6 +408,33 @@ declare_named! { /// > ٨, ٩, /// > ١٠, ١١ EasternArabic = "arabic.eastern" ("١"), + + /// Abjad order + /// [Arabic letters](https://en.wikipedia.org/wiki/Abjad). + /// + /// ## Representable Numbers + /// + /// All non-negative integers can be represented. + /// + /// ## Example + /// + /// The first twenty-eight positive integers are represented as follows: + /// + /// > أ, ب, + /// > ج, د, + /// > ه, و, + /// > ز, ح, + /// > ط, ي, + /// > ك, ل + /// > م, ن + /// > س, ع + /// > ف, ص + /// > ق, ر + /// > ش, ت + /// > ث, خ + /// > ذ, ض + /// > ظ, غ + ArabicAbjad = "arabic.abjad" ("أ"), /// Decimal positional notation using the Persian variant of /// [Eastern Arabic numerals](https://en.wikipedia.org/wiki/Eastern_Arabic_numerals#Numerals). @@ -821,6 +848,11 @@ impl NamedNumeralSystem { Self::EasternArabic => NumeralSystem::Positional(&[ '٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩', ]), + + Self::ArabicAbjad => NumeralSystem::Positional(&[ + 'أ', 'ب', 'ج', 'د', 'ه', 'و', 'ز', 'ح', 'ط', 'ي', 'ك', 'ل', 'م', 'ن', + 'س', 'ع', 'ف', 'ص', 'ق', 'ر', 'ش', 'ت', 'ث', 'خ', 'ذ', 'ض', 'ظ', 'غ', + ]), Self::Persian => NumeralSystem::Positional(&[ '۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹', @@ -1435,6 +1467,7 @@ mod tests { NamedNumeralSystem::KoreanJamo => 65477685939649764827530478995838083425, // 21 NamedNumeralSystem::KoreanSyllable => 24217153056183571894327643661698510954, NamedNumeralSystem::EasternArabic => 277754701051910363703826860323053920831, + NamedNumeralSystem::ArabicAbjad => , // ? NamedNumeralSystem::Persian => 6232158096065129450489636457808686806, NamedNumeralSystem::Devanagari => 327133969362282954753636774557232534052, NamedNumeralSystem::Tibetan => 87580519645280744681237273097105390953, From 5a3cce7611de243566169ac3d50948d19b152a91 Mon Sep 17 00:00:00 2001 From: Salim Bou Date: Wed, 27 May 2026 21:17:56 +0100 Subject: [PATCH 2/3] Update numeral_systems.rs Add Arabic abjad numbering. --- src/numeral_systems.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/numeral_systems.rs b/src/numeral_systems.rs index 5f9d88e..ee6eacd 100644 --- a/src/numeral_systems.rs +++ b/src/numeral_systems.rs @@ -1467,7 +1467,7 @@ mod tests { NamedNumeralSystem::KoreanJamo => 65477685939649764827530478995838083425, // 21 NamedNumeralSystem::KoreanSyllable => 24217153056183571894327643661698510954, NamedNumeralSystem::EasternArabic => 277754701051910363703826860323053920831, - NamedNumeralSystem::ArabicAbjad => , // ? + NamedNumeralSystem::ArabicAbjad => 0, NamedNumeralSystem::Persian => 6232158096065129450489636457808686806, NamedNumeralSystem::Devanagari => 327133969362282954753636774557232534052, NamedNumeralSystem::Tibetan => 87580519645280744681237273097105390953, From 3c208c5af0289c5330fc384e8cb1b3d89a7a71b9 Mon Sep 17 00:00:00 2001 From: Salim Bou Date: Wed, 27 May 2026 21:32:09 +0100 Subject: [PATCH 3/3] Update numeral_systems.rs Add Arabic abjad numbering --- src/numeral_systems.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/numeral_systems.rs b/src/numeral_systems.rs index ee6eacd..2590a88 100644 --- a/src/numeral_systems.rs +++ b/src/numeral_systems.rs @@ -1467,7 +1467,7 @@ mod tests { NamedNumeralSystem::KoreanJamo => 65477685939649764827530478995838083425, // 21 NamedNumeralSystem::KoreanSyllable => 24217153056183571894327643661698510954, NamedNumeralSystem::EasternArabic => 277754701051910363703826860323053920831, - NamedNumeralSystem::ArabicAbjad => 0, + NamedNumeralSystem::ArabicAbjad => 332217778941065507236060222268877272547, NamedNumeralSystem::Persian => 6232158096065129450489636457808686806, NamedNumeralSystem::Devanagari => 327133969362282954753636774557232534052, NamedNumeralSystem::Tibetan => 87580519645280744681237273097105390953,