Skip to content

Commit

Permalink
add reference info
Browse files Browse the repository at this point in the history
  • Loading branch information
librasteve committed Jun 21, 2024
1 parent 967a957 commit cc342ab
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@ Future enhancements will include expansions to printf/sprintf with a custom form

While it handles both additive and subtractive Roman numerals, it doesn't check that they're properly formatted. For instance 'IC' should be a compile-time error but instead it'll generate 101 as if nothing of consequence happened.

REFERENCE
=========

According to [Wikipedia](https://en.wikipedia.org/wiki/Roman_numerals), the standard form is:

| # | Thousands | Hundreds | Tens | Units |
|---|-----------|----------|------|-------|
| 1 | M | C | X | I |
| 2 | MM | CC | XX | II |
| 3 | MMM | CCC | XXX | III |
| 4 | | CD | XL | IV |
| 5 | | D | L | V |
| 6 | | DC | LX | VI |
| 7 | | DCC | LXX | VII |
| 8 | | DCCC | LXXX | VIII |
| 9 | | CM | XC | IX |

The numerals for 4 (IV) and 9 (IX) are written using subtractive notation,where the smaller symbol (I) is subtracted from the larger one (V, or X), thus avoiding the clumsier IIII and VIIII. Subtractive notation is also used for 40 (XL), 90 (XC), 400 (CD) and 900 (CM). These are the only subtractive forms in standard use.

AUTHOR
======

Expand All @@ -34,7 +53,7 @@ Source can be located at: https://github.com/raku-community-modules/Slang-Roman
COPYRIGHT AND LICENSE
=====================

Copyright 2016, 2018 Jeff Goff, 2020-2023 Raku Community
Copyright 2016, 2018 Jeff Goff, 2020-2024 Raku Community

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

0 comments on commit cc342ab

Please sign in to comment.