Difference between revisions of "Template:Evalint"
Jump to navigation
Jump to search
imported>Fran Rogers (importing this very useful template from meta) |
imported>Eliyak (fix cat) |
||
| Line 21: | Line 21: | ||
[[Category:Templates using ParserFunctions|{{PAGENAME}}]] | [[Category:Templates using ParserFunctions|{{PAGENAME}}]] | ||
| − | [[Category:Mathematical templates|{{PAGENAME}}]] | + | [[Category:Mathematical function templates|{{PAGENAME}}]] |
</noinclude> | </noinclude> | ||
Revision as of 18:26, 16 January 2008
m:Template:evalint (backlinks edit)
{{ {{{subst|}}}#ifexpr: 1000000000000 <= ({{{1}}}) and ({{{1}}}) < 1000000000000000000000000
|{{ {{{subst|}}}#expr: (({{{1}}}) - ({{{1}}}) mod 1000000000000)/1000000000000}}{{ {{{subst|}}}lz12|({{{1}}}) mod 1000000000000|subst={{{subst|}}}}}
|{{ {{{subst|}}}#expr: {{{1}}} }} }}
EVALuates INTegers exactly up to 1E16, in a form suitable for input. Numbers between 1E16 and 1E24 are rounded. Larger results are given in scientific notation.
- {{ Evalint | 2*1234567890123456 }} gives 2469Template:Lz12
{{ #expr: 2*1234567890123456}}gives 2.4691357802469E+15- {{ Evalint | 11111111*11111111 }} gives 123Template:Lz12
{{ #expr: 11111111*11111111}}gives 1.2345678765432E+14- {{ Evalint | 2*123456789012345678901234 }} gives 246913578024.6Template:Lz12
- {{ Evalint | 2*1234567890123456789012345 }} gives 2.4691357802469E+24
{{subst:evalint|2*1234567890123456|subst=subst:}} gives the wikitext 2469135780246912