\usepackage{mathtools}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}

The command \ceil will do; if called as \ceil*{x} it will add \left and \right; you can also call it as

\ceil[\big]{x} \ceil[\Big]{x} \ceil[\bigg]{x} \ceil[\Bigg]{x}

to state explicitly the size of the delimiters.

Answer from egreg on Stack Exchange
🌐
Minibatch AI
minibatchai.com › 2023 › 07 › 15 › Latex_floor_ceil_round.html
Writing Ceil, Floor and Abs in LaTeX | Minibatch AI
July 15, 2023 - In this blog post, we will learn how to write the ceiling, floor and absolute value functions in LaTeX, both in mathematical notation and as text.
🌐
LaTeX-Tutorial.com
latex-tutorial.com › home › blog › ceiling and floor function in latex
Ceiling and Floor Function in LaTeX | LaTeX-Tutorial.com
September 9, 2021 - % Floor function in LaTeX \documentclass{article} \begin{document} In \LaTeX{}, the floor function can be typeset using the commands: \verb|\lfloor| and \verb|\rfloor|. Here is an example: floor($x$)=$\lfloor x \rfloor$ \end{document} ... For ...
🌐
Math-Linux
math-linux.com › latex › faq › latex-faq › article › latex-ceiling-function
Latex ceiling function | Math-Linux.com
November 7, 2025 - We can use the $\lceil x \rceil$ function, which returns the smallest integer greater than or equal to $x$. In this case, we have: $$\lceil 4.7 \rceil = 5$$ \[\lceil 4.7 \rceil = 5\] If you found this post or this website helpful and would like to support our work, please consider making a donation.
🌐
Wikipedia
en.wikipedia.org › wiki › Floor_and_ceiling_functions
Floor and ceiling functions - Wikipedia
February 5, 2026 - In some sources, boldface or double brackets ⟦x⟧ are used for floor, and reversed brackets ⟧x⟦ or ]x[ for ceiling. The fractional part is the sawtooth function, denoted by {x} for real x and defined by the formula ...
🌐
CodeSpeedy
codespeedy.com › home › floor (⌊x⌋) and ceiling (⌈x⌉) function in latex
Floor (⌊x⌋) and Ceiling (⌈x⌉) function in LaTeX - CodeSpeedy
March 29, 2024 - To print this symbol in LaTeX you can use the $ \lceil x \rceil $ command and for responsive ceiling brackets use $ \lceil \frac{1}{x} \rceil $ command. \documentclass{article} \begin{document} $$ \lceil x \rceil $$ $$ \lceil \frac{1}{x} \rceil ...
🌐
SCI Journal
scijournal.org › home › latex tutorial › how to write the floor symbol in latex?
How to write the floor symbol in LaTeX? 2026
July 13, 2022 - The symbols are the same as the floor function, except they are inverted, Images created with LaTeX by the author. In LaTeX we use \lceil and \rceil commands for each side of the ceiling function, the same principle from the floor function symbols ...
Top answer
1 of 2
8

Your function scales both input $x$ and output $y$ up by a factor of $100$: $$ \lfloor 100 x \rfloor = 100y, $$ i.e. if we define these scaled coordinates $X = 100x$ and $Y = 100y$, then the equation relating inputs to outputs looks like $$ \lfloor X \rfloor = Y, $$ which you can think of the prototype of the relationship between the variables. Putting all the transformations in one diagram looks like
$$ x \to X \to Y \leftarrow y, $$ so the only way to build the composition $x \to y$ is to invert that last arrow $Y \leftarrow y$ to produce $Y \to y$, namely to divide by the scaling factor, hence we introduce fractions.

As always, we can hide the fraction inside of a definition, which doesn't change the fact that we're dividing by the scaling factor, but cosmetically, it might look nicer. We could, for instance, for any $p > 0$, define a rounding function with precision $\frac1p$ by $$ \operatorname{floor}_p(x) = \frac1p \lfloor p x \rfloor $$ that has the property that $\operatorname{floor}_p(x) = y$ for all $y \leq x \leq y + \frac1p$. With this notation, your example would look like $$ \operatorname{floor}_{100}(2.4783) = 2.47. $$

2 of 2
7

You are asking about truncation.

In the linked Wikipedia article, the notation is as follows.

Given a number $ x\in \mathbb {R}_+ $ to be truncated

and $n\in \mathbb {N} _{0}$, the number of digits to be kept after the decimal point,

the truncated value of $x $ is $\operatorname {trunc} (x,n)={\dfrac {\lfloor 10^{n}\cdot x\rfloor }{10^{n}}}$.

Find elsewhere
🌐
LaTeX.org
latex.org › board index › general
How to ceil or floor the value of length command - LaTeX.org
\begin{document} \uselengthunit{mm} The \verb|\textwidth| is \printlength{\textwidth}, that is, about \rndprintlength{\textwidth}. The \verb|\textwidth| is \TOmm[5]{\textwidth}, that is, about \TOmm[0]{\textwidth}, or \TOmm[1]{\textwidth}, or \TOmm{\textwidth}, or \TOmm[3]{\textwidth}, or \TOmm[4]{\textwidth}. \bigskip \setlength{\unitlength}{1mm} \noindent Test of exactness:\\ \verb|\unitlength|= \printlength{\unitlength} \\ \verb|\unitlength|= \TOmm[5]{\unitlength} \end{document} If you replace \FPround by \FPtrunc, you get the floor function.
🌐
Physics Read
physicsread.com › home › how to represent floor symbol ⌊x⌋ and floor() function in latex?
How to represent floor symbol ⌊x⌋ and floor() function in LaTeX?
September 17, 2024 - The ceiling function works in the opposite way to the floor function—it returns the smallest integer that is greater than or equal to the number. You can represent the ceiling symbol in LaTeX using the \lceil and \rceil commands.
🌐
Sivo
blog.sivo.it.com › home › latex math symbols › how to use ceiling function in latex?
How to use ceiling function in LaTeX? | LaTeX Math Symbols – Sivo
September 24, 2025 - The most effective way to represent the ceiling function in LaTeX, ensuring proper scaling and clear presentation, is by using \left\lceil x \right\rceil. Basic
🌐
Linux Hint
linuxhint.com › write-use-floor-symbol-latex
How to Write and Use a Floor Symbol in LaTeX – Linux Hint
Practical tutorial on how to write and use a floor ⌊x⌋ symbol in LaTeX using the $\floor$ as a source code and \rfloor and \lfloor for the right and left side.
🌐
LaTeX.org
latex.org › board index › math & science
Whole and Fractional part symbols? - LaTeX.org
To quote the Wikipedia's "Floor ... and, e.g., in the LaTeX typesetting system these symbols can be specified with the \lfloor, \rfloor, \lceil and \rceil commands in math mode."...
🌐
GNU TeXmacs Forum
forum.texmacs.cn › t › ceil-and-floor-functions-in-texmacs › 1233
Ceil and floor functions in TeXmacs? - shortcuts - GNU TeXmacs Forum
November 7, 2022 - Dear Texmacs-community, thanks for the great program. It already became my main program for brainstorming and note-keeping as I feel its much more productive than writing latex. I wanted to know if there is a shortcut for the \lceil and \rceil (or \lfloor and \rfloor) latex commands and if ...
🌐
Overleaf
overleaf.com › learn › latex › Operators
Operators - Overleaf, Online LaTeX Editor
Characters in mathematical mode are usually shown in italics, but sometimes certain function names require different formatting which can be accomplished by using operators defined in LaTeX.
Top answer
1 of 2
4

The comprehensive symbol list (see comprehensive) at least lists similar symbols with two vertical lines provided by package nath.

\documentclass{article}
\usepackage{nath}
\begin{document}
\[ \lceil a \rceil \lfloor a \rfloor \]
\[ \lCeil a \rCeil \lFloor a \rFloor \] % nath
\end{document}

Result:

2 of 2
3

Here are two macros \Ceil{<contents>} and \Floor{<contents>} that will create the paired delimiters and adjust to the height of <contents>.

It's hard to build this out of existing symbols because the floor and ceiling symbols have subtle differences at different sizes. Notably, they have round line caps when small but square (butt) line caps when Big.

So these are built from scratch using TikZ. By default all line caps and line joins are round, but you can change these with an optional argument:

\Floor[line cap=butt, line join=miter]{A}

You can also use the optional argument for a variety of TikZ options including color, line style, thickness, etc. For example,

\Ceil[blue, densely dotted, text=red, line width=.9pt]{A}

would work.

Here is the code:

\documentclass{article}

\usepackage{tikz, amsmath}

\newcommand{\Ceil}[2][]{{}\mathrel{\tikz[baseline, anchor=base, line join=round, line cap=round, #1]{
    \node[inner sep=2pt] at (0,0)(a){$#2\mathstrut$};
    \draw([shift={(0,2.8pt)}]a.south west)--([shift={(0,-2pt)}]a.north west)--++(2pt,0);
    \draw([shift={(-1.5pt,2.8pt)}]a.south west)--([shift={(-1.5pt,-.5pt)}]a.north west)--++(3.5pt,0);
    \draw([shift={(0,2.8pt)}]a.south east)--([shift={(0,-2pt)}]a.north east)--++(-2pt,0);
    \draw([shift={(1.5pt,2.8pt)}]a.south east)--([shift={(1.5pt,-.5pt)}]a.north east)--++(-3.5pt,0);
}}{}}
\newcommand{\Floor}[2][]{{}\mathrel{\tikz[baseline, anchor=base, line join=round, line cap=round, #1]{
    \node[inner sep=2pt] at (0,0)(a){$#2\mathstrut$};
    \draw([shift={(0,-2pt)}]a.north west)--([shift={(0,2.8pt)}]a.south west)--++(2pt,0);
    \draw([shift={(-1.5pt,-2pt)}]a.north west)--([shift={(-1.5pt,1.3pt)}]a.south west)--++(3.5pt,0);
    \draw([shift={(0,-2pt)}]a.north east)--([shift={(0,2.8pt)}]a.south east)--++(-2pt,0);
    \draw([shift={(1.5pt,-2pt)}]a.north east)--([shift={(1.5pt,1.3pt)}]a.south east)--++(-3.5pt,0);
}}{}}

\begin{document}

\[
\lfloor a\rfloor\lfloor A\rfloor \left\lfloor\frac{a}{b}\right\rfloor\lceil a\rceil\lceil A\rceil\left\lceil\frac{a}{b}\right\rceil\qquad
\Floor{a}\Floor{A}\Floor{\dfrac{a}{b}}\Ceil{a}\Ceil{A}\Ceil{\dfrac{a}{b}}
\]

\end{document}
🌐
Math-Linux
math-linux.com › latex › faq › latex-faq › article › latex-floor-function
Latex floor function | Math-Linux.com
November 7, 2025 - We can use the floor function $\lfloor x \rfloor$, which returns the largest integer less than or equal to $x$. In this case, we have: $$\lfloor 4.7 \rfloor = 4$$ \[\lfloor 4.7 \rfloor = 4\] If you found this post or this website helpful and would like to support our work, please consider making a donation. Thank you! Help Us ... Latex how to insert a blank or empty page with or without numbering \thispagestyle,\newpage,\usepackage{afterpage}