This site is supported by donations to The OEIS Foundation.

Template:Ceiling/doc

From OeisWiki
Jump to: navigation, search

This documentation subpage contains instructions, categories, or other information for Template:Ceiling. [<Edit> Template:Ceiling]

[⧼Purge⧽ Template:Ceiling/doc]

The {{ceiling}} or {{ceil}} mathematical formatting template and/or mathematical function template gives an HTML+CSS or a LaTeX formatted ceiling function of an expression and/or the numerical result of the ceiling of an expression (in which case it must evaluate to a real number).

Usage

{{ceil|expression}}

or

{{ceil|expression|format}}

where the last argument (format) is from

  • htm: HTML+CSS [single line] (default);
  • HTM: HTML+CSS [multiline];
  • tex: LaTeX [single line];
  • TEX: LaTeX [multiline];

or

  • #: numerical result.

As an alternative to using LaTeX rendered PNG images (tex or TEX options), the htm or HTM options will produce an HTML+CSS formatted expression. (Do not use this option inside <math>...</math> tags.)

NOTE: To get rendered LaTeX, you must use the {{math}} template, since you cannot evaluate templates, parser functions or magic words inside <math>...</math> tags.

Examples

The code {{math|{{ceil}}|&}} yields the text style HTML+CSS 
⌈·⌉

The code {{math|{{ceil|HTM}}|&}} yields the text style HTML+CSS 
·

The code {{math|{{ceil|tex}}|$}} yields the text style LaTeX

The code {{math|{{ceil|TEX}}|$}} yields the text style LaTeX


The code {{math|{{ceil|''x''}}|&}} yields the text style HTML+CSS 
⌈ x

The code {{math|{{ceil|''x''|HTM}}|&}} yields the text style HTML+CSS 
x

The code {{math|{{ceil|''x''|tex}}|$}} yields the text style LaTeX

The code {{math|{{ceil|''x''|TEX}}|$}} yields the text style LaTeX


The code {{math|{{ceil|''x''}}|&&}} yields the display style HTML+CSS

     
⌈ x

The code {{math|{{ceil|''x''|HTM}}|&&}} yields the display style HTML+CSS

     
x

The code {{math|{{ceil|''x''|tex}}|$$}} yields the display style LaTeX

     

The code {{math|{{ceil|''x''|TEX}}|$$}} yields the display style LaTeX

     


The code {{math|{{ceil|5.3}} {{=}} {{ceil|5.3|#}}|&}} yields the text style HTML+CSS 
⌈ 5.3⌉
= 6

The code {{math|{{ceil|5.3|HTM}} {{=}} {{ceil|5.3|#}}|&}} yields the text style HTML+CSS 
5.3
= 6

The code {{math|{{ceil|5.3|tex}} {{=}} {{ceil|5.3|#}}|$}} yields the text style LaTeX

The code {{math|{{ceil|5.3|TEX}} {{=}} {{ceil|5.3|#}}|$}} yields the text style LaTeX


The code {{math|{{ceil|5.3}} {{=}} {{ceil|5.3|#}}|&&}} yields the display style HTML+CSS

     
⌈ 5.3⌉
= 6

The code {{math|{{ceil|5.3|HTM}} {{=}} {{ceil|5.3|#}}|&&}} yields the display style HTML+CSS

     
5.3
= 6

The code {{math|{{ceil|5.3|tex}} {{=}} {{ceil|5.3|#}}|$$}} yields the display style LaTeX

     

The code {{math|{{ceil|5.3|TEX}} {{=}} {{ceil|5.3|#}}|$$}} yields the display style LaTeX

     

Quotients

The code

{{indent}}{{math|{{ceil|{{frac|''x'' + ''m''|''n''}}|HTM}} {{=}} {{ceil|{{frac|{{ceil|''x''}} + ''m''|''n''}}|HTM}}.
| title = \left\lceil \frac {x + m}{n} \right\rceil = \left\lceil \frac {\lceil x \rceil + m}{n} \right\rceil .  
|&&}}

yields the display style HTML+CSS

     
x + m
n
=
⌈ x
+ m
n
.

The code

{{indent}}{{math|{{ceil|{{frac|''x'' + ''m''|''n''}}|HTM}} {{=}} {{ceil|{{frac|{{ceil|''x''|HTM}} + ''m''|''n''}}|HTM}}.
| title = \left\lceil \frac {x + m}{n} \right\rceil = \left\lceil \frac {\lceil x \rceil + m}{n} \right\rceil .  
|&&}}

yields the display style HTML+CSS

     
x + m
n
=
x
+ m
n
.

The code

{{indent}}{{math|{{ceil|{{frac|''x'' + ''m''|''n''|tex}}|TEX}} {{=}} {{ceil|{{frac|{{ceil|''x''|tex}} + ''m''|''n''|tex}}|TEX}}.|$$}}

yields the display style LaTeX

     

The code

{{indent}}{{math|\displaystyle \left\lceil \frac {x + m}{n} \right\rceil {{=}} \left\lceil \frac {\lceil x \rceil + m}{n} \right\rceil .|$$}}

yields the display style LaTeX

     

See also