سانچہ:رومن اعداد
| اس سانچے میں حسب ذیل لوا ماڈیول زیر استعمال ہے: |
| متعلقہ صفحات |
|---|
This template converts عربی اعدادs (that is, 1, 2, 3, etc.) into رومن اعدادs (I, II, III etc.). It currently works for any whole number between 1 and 4999999.
Usage
[ترمیم]{{رومن اعداد|number|message}}
Replace number with the number you would like to be converted to Roman numerals. For numbers higher than 4999999 the template outputs "N/A". This can be changed by replacing message with your preferred text.
An overline, representing multiplication by 1000, is used to extend the upper range of the function.
See رومن اعداد for further information.
Fraction support
[ترمیم]The template can accept parsing decimals, fractions, and arithmetic expressions. This is not enabled by default. To enable this, supply |fraction=yes, i.e. {{رومن اعداد|105.5|fraction=yes}} or {{رومن اعداد|105.5|too big|fraction=yes}}.
Roman numeral output for fractional values uses these symbols:
- S = 1⁄2
- : = 1⁄6
- • = 1⁄12
- Є = 1⁄24
- ƧƧ = 1⁄36
- Ɔ = 1⁄48
- Ƨ = 1⁄72
Ƨ= 1⁄144- ℈ = 1⁄288
- » = 1⁄1728
- N = 0
Examples
[ترمیم]| Arabic numerals | Template call | Roman numerals |
|---|---|---|
| 0 | {{Roman|0}} | |
| 1 | {{Roman|1}} | I |
| 2 | {{Roman|2}} | II |
| 49 | {{Roman|49}} | XLIX |
| 50 | {{Roman|50}} | L |
| 51 | {{Roman|51}} | LI |
| 1024 | {{Roman|1024}} | MXXIV |
| 4999 | {{Roman|4999}} | MMMMCMXCIX |
| 5000 | {{Roman|5000}} | V |
| 5001 | {{Roman|5001}} | VI |
| 69105 | {{Roman|69105}} | LXVMMMMCV |
| 1048576 | {{Roman|1048576}} | MXLVMMMDLXXVI |
| 4999999 | {{Roman|4999999}} | MMMMCMXCVMMMMCMXCIX |
| 7654321 | {{Roman|7654321}} | N/A |
| 7654321 | {{Roman|7654321|too high}} | too high |
If the number provided is negative, the template will output an error message. If the first parameter provided cannot be interpreted as a number, the template will also output an error message. If no arguments are given, the template produces no output.
Decimal, fractional, and arithmetic examples
[ترمیم]| Value | Template Call | Roman Numerals |
|---|---|---|
| 0.0005 | {{Roman|0.0005}} | |
| 20.002 | {{Roman|20.002}} | XX |
| 110.003472 | {{Roman|110.003472}} | CX |
| 3+4.007 | {{Roman|3+4.007}} | |
| 1-0.9861 | {{Roman|1-0.9861}} | |
| 4.6*2.5 | {{Roman|4.6*2.5}} | |
| 1/3 | {{Roman|1/3}} | |
| 9999/10000 | {{Roman|9999/10000}} | |
| 100+5.5 | {{Roman|100+5.5}} |
TemplateData
[ترمیم]معلومات سانچہ رومن اعداد
Convert numbers to Roman numerals.
| پیرامیٹر | وضاحت | طرز | حالت | |
|---|---|---|---|---|
| Number | 1 | The number to be converted to Roman numerals. If the parameter passed cannot be interpreted as a numerical value, no output is generated.
| عدد | اختیاری |
| Message | 2 | Message to display for numbers that are too big to be displayed in Roman numerals. (The largest number supported is 4999999.)
| اِسٹرنگ | اختیاری |
| اوپر دی گئی دستاویز صفحہ سانچہ:رومن اعداد/دستاویز سے شامل کی گئی ہے۔ (ترمیم | تاریخچہ) صارفین سانچہ کے تختہ مشق (تخلیق | آئینہ) اور ثابتات (تخلیق) میں تجربات کرسکتے ہیں۔ براہ کرم /دستاویز کے ذیلی صفحہ پر زمرہ جات شامل فرمائیں۔ اس سانچہ کے ذیلی صفحات۔ |