https://github.com/harryscholes/romannumerals.jl
Roman numeral arithmetic
https://github.com/harryscholes/romannumerals.jl
julia roman-number roman-number-converter roman-numeral roman-numerals
Last synced: 3 months ago
JSON representation
Roman numeral arithmetic
- Host: GitHub
- URL: https://github.com/harryscholes/romannumerals.jl
- Owner: harryscholes
- License: mit
- Created: 2019-03-06T09:10:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-26T19:50:38.000Z (about 5 years ago)
- Last Synced: 2025-02-05T10:49:19.596Z (5 months ago)
- Topics: julia, roman-number, roman-number-converter, roman-numeral, roman-numerals
- Language: Julia
- Homepage:
- Size: 27.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RomanNumerals.jl
[](https://harryscholes.github.io/RomanNumerals.jl/stable)
[](https://harryscholes.github.io/RomanNumerals.jl/dev)
[](https://travis-ci.com/harryscholes/RomanNumerals.jl)
[](https://codecov.io/gh/harryscholes/RomanNumerals.jl)
[](https://coveralls.io/github/harryscholes/RomanNumerals.jl?branch=master)Julia package for Roman numerals.
# Installation
```julia
] add https://github.com/harryscholes/RomanNumerals.jl
```# Examples
```julia
julia> using RomanNumeralsjulia> foreach(i->println(RomanNumeral(i)), 1:5)
I
II
III
IV
Vjulia> I + I
IIjulia> V - I
IVjulia> 3X - 2I
XXVIIIjulia> M ÷ X
Cjulia> rand(RomanNumeral, 5)
5-element Array{RomanNumeral,1}:
LXXI
CXX
XCVIII
XLIX
VIIIjulia> RomanNumeral(2019)
MMXIXjulia> Int16(rn"MMXIX")
2019julia> rn"I" == RomanNumeral("I") == RomanNumeral('I') == RomanNumeral(1)
true
```