Module:Roman/doc explained

This module implements the template. For behavioral documentation, please see the template page. For test cases, please see .

LXVMMMMCV. With the addition of IX and IV being 9000 and 4000 respectively, we now display 69105 as LXIXCV.

Handling tricky cases (like 0.00001 and 99.99999)

  1. Find the Roman numerals for the integer part of the number.
  2. 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)
  3. 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