Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a23ed17d8e37cac0

Jump to content

Template:Roman/testcases

From Wikipedia, the free encyclopedia

Empty

[edit]

{{Roman}}

{{Roman/sandbox}}

{{Roman|}}

{{Roman/sandbox|}}

Live tests with fraction=yes

[edit]

{{Roman|105.5|fraction=yes}}

CVS

{{Roman|1/7+9|fraction=yes}}

IX•ЄƧ℈»

General cases

[edit]
InputLiveSandboxUser:Stelio/Roman
0NNN
1III
2IIIIII
3IIIIIIIII
4IVIVIV
5VVV
6VIVIVI
7VIIVIIVII
8VIIIVIIIVIII
9IXIXIX
10XXX
11XIXIXI
12XIIXIIXII
13XIIIXIIIXIII
14XIVXIVXIV
15XVXVXV
16XVIXVIXVI
17XVIIXVIIXVII
18XVIIIXVIIIXVIII
19XIXXIXXIX
20XXXXXX
31XXXIXXXIXXXI
32XXXIIXXXIIXXXII
33XXXIIIXXXIIIXXXIII
34XXXIVXXXIVXXXIV
35XXXVXXXVXXXV
36XXXVIXXXVIXXXVI
37XXXVIIXXXVIIXXXVII
38XXXVIIIXXXVIIIXXXVIII
39XXXIXXXXIXXXXIX
40XLXLXL
41XLIXLIXLI
42XLIIXLIIXLII
43XLIIIXLIIIXLIII
44XLIVXLIVXLIV
45XLVXLVXLV
46XLVIXLVIXLVI
47XLVIIXLVIIXLVII
48XLVIIIXLVIIIXLVIII
49XLIXXLIXXLIX
50LLL
90XCXCXC
91XCIXCIXCI
92XCIIXCIIXCII
93XCIIIXCIIIXCIII
94XCIVXCIVXCIV
95XCVXCVXCV
96XCVIXCVIXCVI
97XCVIIXCVIIXCVII
98XCVIIIXCVIIIXCVIII
99XCIXXCIXXCIX
100CCC
101CICICI
102CIICIICII
103CIIICIIICIII
104CIVCIVCIV
105CVCVCV
106CVICVICVI
107CVIICVIICVII
108CVIIICVIIICVIII
109CIXCIXCIX
1000MMM
1234MCCXXXIVMCCXXXIVMCCXXXIV
2999MMCMXCIXMMCMXCIXMMCMXCIX
3000MMMMMMMMM
4999IVCMXCIXIVCMXCIXIVCMXCIX
5000VVV
5001VIVIVI
49999XLIXCMXCIXXLIXCMXCIXXLIXCMXCIX
50000LLL
50001LILILI
69105LXIXCVLXIXCVLXIXCV
69105LXIXCVLXIXCVLXIXCV
999999CMXCIXCMXCIXCMXCIXCMXCIXCMXCIXCMXCIX
1000000MMM
4999999MMMMCMXCIXCMXCIXMMMMCMXCIXCMXCIXMMMMCMXCIXCMXCIX

Numbers exceeding 4999999

[edit]
InputLiveSandboxUser:Stelio/Roman
5000000N/AN/A5000000 is too big to be converted to Roman numerals
5000010N/AN/A5000010 is too big to be converted to Roman numerals
3000000000N/AN/A3000000000 is too big to be converted to Roman numerals

Custom messages when too big

[edit]
InputLiveSandboxUser:Stelio/Roman
5000010 with "too big"too bigtoo bigtoo big
5000010 with "??"??????

Sandbox params validation

[edit]
  • Sandbox w/ '1000|too big': M
  • Sandbox with '1000|fraction=yes|too big': M
  • Sandbox with '1000|too big|fraction=yes': M
  • Sandbox w/ '4210987|too big': MMMMCCXCMLXXXVII
  • Sandbox with '4210987|fraction=yes|too big': MMMMCCXCMLXXXVII
  • Sandbox with '4210987|too big|fraction=yes': MMMMCCXCMLXXXVII
  • Sandbox w/ '4210987.1|too big': MMMMCCXCMLXXXVII
  • Sandbox with '4210987.1|fraction=yes|too big': MMMMCCXCMLXXXVII•Ƨ»»»»»
  • Sandbox with '4210987.1|too big|fraction=yes': MMMMCCXCMLXXXVII•Ƨ»»»»»
  • Sandbox w/ '5000010|too big': too big
  • Sandbox with '5000010|fraction=yes|too big': too big
  • Sandbox with '5000010|too big|fraction=yes': too big
  • Sandbox w/ '3000000000|too big': too big
  • Sandbox with '3000000000|fraction=yes|too big': too big
  • Sandbox with '3000000000|too big|fraction=yes': too big

Decimal cases between 0 and 1

[edit]
InputLiveLive with fraction=yesSandboxSandbox with fraction=yesUser:Stelio/Roman
0.0001»»N
0.0005»»»
0.00057»»»
0.000578703»»»
0.000578704»»»
0.00347222
0.00347223
0.007ƧƧƻ
0.0139ƧƧƧ
0.02084ƆƆƆ
0.0278ƧƧƧƧƧƧ
0.04167ЄЄЄ
0.08334
0.142858•ЄƧ℈»•ЄƧ℈»•ЄƧ℈»
0.1667:::
0.2:ƧƧ℈»»»»:ƧƧ℈»»»»:ƧƧ℈»»»»
0.25:::
0.3333:::::•ЄƧƧƻ℈
.3333:::::•ЄƧƧƻ℈
0.3334::::::
0.34::Ƨ::Ƨ::
0.4::ЄƆ℈»::ЄƆ℈»::ЄƆ℈»
0.41666::::::ЄƧƧƻ℈
0.41667::::::
0.42::::::
0.5SSS
0.55Ƨ»»Ƨ»»SЄƻ»»
0.6S•Ƨ»»»»»S•Ƨ»»»»»S•Ƨ»»»»»
0.7S:ƧƧ℈»»»»S:ƧƧ℈»»»»S:ƧƧ℈»»»»
0.75S:S:S:
0.95S::ƧƧ℈»»»»S::ƧƧ℈»»»»S::ƧƧ℈»»»»
0.9999S::ЄƧƧƧ℈»»»»»S::ЄƧƧƧ℈»»»»»S::ЄƧƧƻ℈
0.999999S::ЄƧƧƧ℈»»»»»S::ЄƧƧƧ℈»»»»»S::ЄƧƧƻ℈

Fractional cases between 0 and 1

[edit]
InputLiveLive with fraction=yesSandboxSandbox with fraction=yesUser:Stelio/Roman
1/1728»»»
1/288
1/144ƧƧƻ
1/72ƧƧƧ
1/48ƆƆƆ
1/36ƧƧƧƧƧƧ
1/24ЄЄЄ
1/12
1/7•ЄƧ℈»•ЄƧ℈»•ЄƧ℈»
1/6:::
1/5:ƧƧ℈»»»»:ƧƧ℈»»»»:ƧƧ℈»»»»
1/4:::
1/3::::::
5/12::::::
1/2SSS
2/3S:S:S:
14/17S:•ЄƧƧ℈»S:•ЄƧƧ℈»S:•ЄƧƧ℈»
5/6S::S::S::
71/72S::ЄƧƧS::ЄƧƧS::ЄƧƧ
999/1000S::ЄƧƧƧ℈»»»»S::ЄƧƧƧ℈»»»»S::ЄƧƧƻ℈»»»»
1727/1728S::ЄƧƧƧ℈»»»»»S::ЄƧƧƧ℈»»»»»S::ЄƧƧƻ℈»»»»»
9999/10000S::ЄƧƧƧ℈»»»»»S::ЄƧƧƧ℈»»»»»S::ЄƧƧƻ℈

Negative, decimal/fractional, arithmetic, and misc corner cases

[edit]
InputLiveLive with fraction=yesSandboxSandbox with fraction=yesUser:Stelio/Roman with "custom"
-1Lua error: Invalid number -1.Lua error: Invalid number -1.Lua error: Invalid number -1.Lua error: Invalid number -1.custom
-0NNNNN
-1234Lua error: Invalid number -1234.Lua error: Invalid number -1234.Lua error: Invalid number -1234.Lua error: Invalid number -1234.custom
177/3.5LLSЄƧƧ»»»LLSЄƧƧ»»»LSЄƧƧ»»»
50.572LLSЄƧƧ»»»»LLSЄƧƧ»»»»LSЄƧƧ»»»»
1+1IIIIIIIIII
10-1IXIXIXIXIX
4*8XXXIIXXXIIXXXIIXXXIIXXXII
80/2XLXLXLXLXL
2^8CCLVICCLVICCLVICCLVICCLVI
105.5CVCVSCVCVSCVS
2999.765432MMCMXCIXMMCMXCIXS:•Ƨ»»»MMCMXCIXMMCMXCIXS:•Ƨ»»»MMCMXCIXS:•Ƨ»»»
3000.22638MMMMMM:ЄƧ℈»MMMMMM:ЄƧ℈»MMM:ЄƧ℈»
69105.8LXIXCVLXIXCVS:•ЄƧ»»LXIXCVLXIXCVS:•ЄƧ»»LXIXCVS:•Єƻ»»

Stelio's negative handling

[edit]
  • -1: Negative numbers (such as -1) cannot be converted to Roman numerals
  • -1234: Negative numbers (such as -1234) cannot be converted to Roman numerals

Large arithmetic expressions

[edit]
  • 4999999 1727/1728
    • live Lua error: Invalid number 4999999 1727/1728.
    • live fraction Lua error: Invalid number 4999999 1727/1728.
    • sandbox Lua error: Invalid number 4999999 1727/1728.
    • sandbox fraction Lua error: Invalid number 4999999 1727/1728.
    • Stelio Expression error: Unexpected number.
  • 4999999.9999999
    • live MMMMCMXCIXCMXCIX
    • live fraction MMMMCMXCIXCMXCIXS::ЄƧƧƧ℈»»»»»
    • sandbox MMMMCMXCIXCMXCIX
    • sandbox fraction MMMMCMXCIXCMXCIXS::ЄƧƧƧ℈»»»»»
    • Stelio 4999999.9999999 is too big to be converted to Roman numerals
  • 4999999+1727/1728
    • live MMMMCMXCIXCMXCIX
    • live fraction MMMMCMXCIXCMXCIXS::ЄƧƧƧ℈»»»»»
    • sandbox MMMMCMXCIXCMXCIX
    • sandbox fraction MMMMCMXCIXCMXCIXS::ЄƧƧƧ℈»»»»»
    • Stelio MMMMCMXCIXCMXCIXS::ЄƧƧƻ℈»»»»»
  • 4,999,999 1727/1728
    • live Lua error: Invalid number 4,999,999 1727/1728.
    • live fraction Lua error: Invalid number 4,999,999 1727/1728.
    • sandbox Lua error: Invalid number 4,999,999 1727/1728.
    • sandbox fraction Lua error: Invalid number 4,999,999 1727/1728.
    • Stelio Expression error: Unrecognized punctuation character ",".
  • 5000001-2
    • live MMMMCMXCIXCMXCIX
    • live fraction MMMMCMXCIXCMXCIX
    • sandbox MMMMCMXCIXCMXCIX
    • sandbox fraction MMMMCMXCIXCMXCIX
    • Stelio MMMMCMXCIXCMXCIX