Template:Floor: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Verdy p mNo edit summary |
meta>Verdy p mNo edit summary |
||
Line 25: | Line 25: | ||
; Known bug (should appear extremely rarely as this goes beyond the precision of math performed in pages using this template) | ; Known bug (should appear extremely rarely as this goes beyond the precision of math performed in pages using this template) | ||
* <tt><nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|</nowiki>-0.999999999999999<nowiki>}}</nowiki></tt> = {{{{PAGENAME}}|-0.999999999999999}}. | * <tt><nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|</nowiki>-0.999999999999999<nowiki>}}</nowiki></tt> = {{{{PAGENAME}}|-0.999999999999999}} (OK). | ||
* <tt><nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|</nowiki>-0.9999999999999999<nowiki>}}</nowiki></tt> = <span style="color:red">{{{{PAGENAME}}|-0.9999999999999999}}</span> (wrong for now and unexplainable, how to correct it?). | * <tt><nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|</nowiki>-0.9999999999999999<nowiki>}}</nowiki></tt> = <span style="color:red">{{{{PAGENAME}}|-0.9999999999999999}}</span> (wrong for now and unexplainable, how to correct it?). | ||
* <tt><nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|</nowiki>-1.9999999999999999<nowiki>}}</nowiki></tt> = {{{{PAGENAME}}|-1.9999999999999999}} (OK). | |||
; See also<nowiki>:</nowiki> | ; See also<nowiki>:</nowiki> |
Revision as of 06:46, 3 May 2006
Template:Template documentation Implements the mathematical floor function, i.e. returns the input value if it is an integer, otherwise returns the largest integer below the input value.
- Usage:
- {{Floor|value}}
- Examples:
- {{Floor|3.9}} = 3.
- {{Floor|3.5}} = 3.
- {{Floor|3.1}} = 3.
- {{Floor|3.0}} = 3.
- {{Floor|1.0}} = 1.
- {{Floor|0.9}} = 0.
- {{Floor|0.5}} = 0.
- {{Floor|0.1}} = 0.
- {{Floor|0.0}} = 0.
- {{Floor|-0.1}} = -1.
- {{Floor|-0.5}} = -1.
- {{Floor|-0.9}} = -1.
- {{Floor|-1.0}} = -1.
- {{Floor|-3.0}} = -3.
- {{Floor|-3.2}} = -4.
- {{Floor|-3.5}} = -4.
- {{Floor|-3.9}} = -4.
- Known bug (should appear extremely rarely as this goes beyond the precision of math performed in pages using this template)
- {{Floor|-0.999999999999999}} = -2 (OK).
- {{Floor|-0.9999999999999999}} = -2 (wrong for now and unexplainable, how to correct it?).
- {{Floor|-1.9999999999999999}} = -2 (OK).
- See also: