3 releases

0.1.2 Nov 2, 2024
0.1.1 Jun 3, 2024
0.1.0 Jun 3, 2024

#1329 in Algorithms

Download history 9/week @ 2024-07-23 7/week @ 2024-09-24 3/week @ 2024-10-01 132/week @ 2024-10-29 18/week @ 2024-11-05

150 downloads per month

MIT license

11KB
175 lines

Greek Numeber

CI

Convert numbers to Greek numbers

It implements the single digit M power representation from The Greek Number Converter and also described in Greek Numbers, it can represent numbers up to 9,999,999,999,999,999,999,999,999,999,999,999,999,999.

Example

use greek_number::{to_greek_lowercase, to_greek_uppercase};

println!("{}", to_greek_lowercase(1)); // "αʹ"
println!("{}", to_greek_lowercase(241)); // "σμαʹ"
println!("{}", to_greek_uppercase(1)); // "Αʹ"
println!("{}", to_greek_uppercase(241)); // "ΣΜΑʹ"

println!("{}", to_greek_uppercase(97_554)); //  "αΜθʹ, ͵ζφνδ"
println!("{}", to_greek_uppercase(2_056_839_184)); // "βΜκʹ, αΜ͵εχπγ, ͵θρπδ"
println!("{}", to_greek_uppercase(12_312_398_676)); // "βΜρκγʹ, αΜ͵ασλθ, ͵ηχοϛ"
println!("{}", to_greek_uppercase(2_000_000_000)); "βΜκʹ"
println!("{}", to_greek_uppercase(90_000_001)); "αΜ͵θ, αʹ"

No runtime deps