Functions and operators

⌊x⌋,  ⌈x⌉\lfloor x \rfloor, \; \lceil x \rceil Floor and ceiling

Round down (floor ⌊x⌋) or round up (ceiling ⌈x⌉) to a whole number.

In ML papers

⌊x⌋\lfloor x \rfloor is the floor: the largest whole number not above xx. ⌈x⌉\lceil x \rceil is the ceiling: the smallest whole number not below xx. The bars only at the bottom mean "down"; the bars only at the top mean "up".

They appear when a count must be whole: the output size of a convolution, the number of batches in an epoch, the index of the middle element, the number of tokens kept by a top-pp or top-kk rule.

How to type it

LaTeXShows
\lfloor x \rfloor floor⌊x⌋\lfloor x \rfloor
\lceil x \rceil ceiling⌈x⌉\lceil x \rceil

A worked example

⌊32+2⋅1−32⌋+1=⌊15.5⌋+1=16\left\lfloor \frac{32 + 2 \cdot 1 - 3}{2} \right\rfloor + 1 = \lfloor 15.5 \rfloor + 1 = 16

A 3×33 \times 3 convolution with padding 1 and stride 2 turns a 32-pixel side into 16. And ⌈1000/64⌉=16\lceil 1000 / 64 \rceil = 16 batches cover 1000 examples.

Common confusions

Related

a mod na \bmod nModuloab\frac{a}{b}Fraction∣x∣|x|Absolute value (bars)

Decode this example →