Editing
Module:Roman/doc
From Thetacola Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{High-use|3700+}} {{Module rating|protected}} {{Lua sidebar}} This module implements the {{tl|Roman}} template. For behavioral documentation, please see the template page. For test cases, please see [[Template:Roman/testcases]]. * Module supports 0 as a Roman numeral, displays as 'N'. * Prior to 25 April 2016, used to display 69105 as <span style="text-decoration:overline;">LXV</span>MMMMCV. With the addition of <span style="text-decoration:overline;">IX</span> and <span style="text-decoration:overline;">IV</span> being 9000 and 4000 respectively, we now display 69105 as <span style="text-decoration:overline;">LXIX</span>CV. * Module handles decimal, fractional, and arithmetic expressions to a precision of 1/1728. {{green|Uses <code>#expr:</code> at line 118.}} ==Handling tricky cases (like 0.00001 and 99.99999)== # Find the Roman numerals for the integer part of the number. # If the number is not an integer: #* Add half of the smallest unit (1/1728) to simulate rounding instead of truncation. #* Ensure this new result is between 1/1728 and 1727/1728. (actually 1.1/1728 and 1727.1/1728 due to floating point rounding issues) # Hence, 0.00001 is guaranteed to have at least the smallest unit symbol (instead of being blank or 0), and 99.99999 does not display as 100 or 99 and 2 halves. ==Validation== *[[Template:Roman/testcases]] *[[Module:Roman/testcases]] - does not contain fractional/decimal tests *The template supports subst: and safesubst:.
Summary:
Please note that all contributions to Thetacola Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Endplainlist
(
edit
)
Template:Green
(
edit
)
Template:High-use
(
edit
)
Template:Lua sidebar
(
edit
)
Template:Lua sidebar/styles.css
(
edit
)
Template:Module rating
(
edit
)
Template:Nowrap
(
edit
)
Template:Plainlist
(
edit
)
Template:Sidebar
(
edit
)
Template:Template link
(
edit
)
Template:Tl
(
edit
)
Module:Arguments
(
edit
)
Module:High-use
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:No globals
(
edit
)
Module:Redirect
(
edit
)
Module:Sidebar
(
edit
)
Module:Sidebar/configuration
(
edit
)
Module:Sidebar/styles.css
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/R
(
edit
)
Module:Yesno
(
edit
)
Navigation menu
Page actions
Module
Discussion
Read
Edit source
History
Page actions
Module
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information