Template:Ceil: Difference between revisions
From Vigyanwiki
Template>Python eggs m (+zh-classical:) |
Template>Cydebot m (Robot - Moving category Mathematical templates to Mathematical function templates per CFD at Wikipedia:Categories for discussion/Log/2007 January 19.) |
||
Line 27: | Line 27: | ||
; See also<nowiki>:</nowiki> | ; See also<nowiki>:</nowiki> | ||
* [[Template:Floor | * [[Template:Floor[[Category:Templates using ParserFunctions|{{PAGENAME}}]] | ||
[[Category:Mathematical function templates|{{PAGENAME}}]] | |||
[[Category:Templates using ParserFunctions|{{PAGENAME}}]] | ]] | ||
[[Category:Mathematical templates|{{PAGENAME}}]] | |||
[[fr:Modèle:Ceil]] | [[fr:Modèle:Ceil]] |
Revision as of 03:03, 7 February 2007
Template:Template documentation Implements the mathematical ceil function, i.e. returns the input value if it’s an integer, otherwise returns the lowest integer which is still greater than the input value.
For negative numbers, it will truncate the displayed decimals. For positive numbers, the decimals will be dropped and the integer part of the value displayed is incremented (unless the input is already an integer). This is the mathematical definition of the IEEE rounding mode toward plus infinite.
- Usage:
- {{Ceil|value}}
- Examples:
- {{Ceil|3.9}} = 4.
- {{Ceil|3.5}} = 4.
- {{Ceil|3.1}} = 4.
- {{Ceil|3.0}} = 3.
- {{Ceil|1.0}} = 1.
- {{Ceil|0.9}} = 1.
- {{Ceil|0.5}} = 1.
- {{Ceil|0.1}} = 1.
- {{Ceil|0.0}} = 0.
- {{Ceil|-0.1}} = 0.
- {{Ceil|-0.5}} = 0.
- {{Ceil|-0.9}} = 0.
- {{Ceil|-1.0}} = -1.
- {{Ceil|-3.0}} = -3.
- {{Ceil|-3.2}} = -3.
- {{Ceil|-3.5}} = -3.
- {{Ceil|-3.9}} = -3.
- See also:
- [[Template:Floor
]]