Template:Lz3
From FEInfobase
This 'Lz3' template documentation is transcluded for all Lz3 including templates [edit].Masterpage
Comma Separated Number
Separates digits of an integer in groups of three; works for numbers under 1E15. Only positive numbers are supported, larger numbers are just provided in their standard output form.
Csn does some additional things that formatnum does not: rounding to an integer, removing leading zeros, removing - from -0, writing in scientific notation, computations.
- Examples comparing csn and {{formatnum: number }}
- {{ csn/Csn demo | -1 }} = -1 -1
- {{ csn/Csn demo | -0 }} = 0 -0
- {{ csn/Csn demo | 0.1 }} = 0 0.1
- {{ csn/Csn demo | 1.23 }} = 1 1.23
- {{ csn/Csn demo | 12.3 }} = 12 12.3
- {{ csn/Csn demo | 6*20 }} = 120 6*20
- {{ csn/Csn demo | 1234 }} = 1,234 1,234
- {{ csn/Csn demo | 1230 }} = 1,230 1,230
- {{ csn/Csn demo | 1200 }} = 1,200 1,200
- {{ csn/Csn demo | 1000 }} = 1,0 1,000
- {{ csn/Csn demo | 0000 }} = 0 0,000
- {{ csn/Csn demo | 12345.67890123456 }} = 12,346 12,345.67890123456
- {{ csn/Csn demo | 123456.7890123456 }} = 123,457 123,456.7890123456
- {{ csn/Csn demo | 1234567.890123456 }} = 1,234,568 1,234,567.890123456
- {{ csn/Csn demo | 12345678.90123456 }} = 12,345,679 12,345,678.90123456
- {{ csn/Csn demo | 123456789.0123456 }} = 123,456,789 123,456,789.0123456
- {{ csn/Csn demo | 1234567890.123456 }} = 1,234,567,890 1,234,567,890.123456
- {{ csn/Csn demo | 12345678901.23456 }} = 12,345,678,901 12,345,678,901.23456
- {{ csn/Csn demo | 123456789012.3456 }} = 123,456,789,12 123,456,789,012.3456
- {{ csn/Csn demo | 1234567890123.456 }} = 1,234,567,890,123 1,234,567,890,123.456
- {{ csn/Csn demo | 12345678901234.56 }} = 12,345,678,901,235 12,345,678,901,234.56
- {{ csn/Csn demo | 123456789012345.6 }} = 123,456,789,12,346 123,456,789,012,345.6
- {{ csn/Csn demo | 1234567890123456. }} = 1.23456789012E+15 1,234,567,890,123,456.
- {{ csn/Csn demo | 12 }} = 12 12
- {{ csn/Csn demo | 1234 }} = 1,234 1,234
- {{ csn/Csn demo | 123456 }} = 123,456 123,456
- {{ csn/Csn demo | 12345678 }} = 12,345,678 12,345,678
- {{ csn/Csn demo | 1234567890 }} = 1,234,567,890 1,234,567,890
- {{ csn/Csn demo | 123456789012 }} = 123,456,789,12 123,456,789,012
- {{ csn/Csn demo | 12345678901234 }} = 12,345,678,901,234 12,345,678,901,234
{{subst:csn|123456789012345|subst=subst:}} gives the wikitext 123,456,789,012,345
{{subst:formatnum:123456789012345}} gives the wikitext 123,456,789,012,345
{{ csn/Csn demo | 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17 }} = 355,687,428,96,0 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17.