Fractional Part in LaTeX (\{x\})
- LaTeX command
\{x\}- Package
- No package needed: built into LaTeX
- Mode
- Text and math mode
Where it is used
Fractional part of x, defined as x minus its floor, written with escaped braces.
Since bare braces only group in LaTeX, the visible ones must be escaped as \{ and \}. The fractional part satisfies x = \lfloor x \rfloor + \{x\} with 0 \le \{x\} < 1, and it appears in equidistribution results such as Weyl's theorem that \{n\alpha\} is uniformly distributed for irrational \alpha. The same braces also denote sets, so \{x\} could be read as the singleton containing x; define the notation or write \operatorname{frac}(x). For taller contents, use \left\{ ... \right\}.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Fractional Part: $\{x\}$
\[ x = \lfloor x \rfloor + \{x\} \]
\end{document}Related symbols
- Sum of Divisors
\sigma(n) - Integer Part
[x] - Mobius Function
\mu(n) - Ceiling
\lceil x \rceil - Number of Divisors
d(n) - Floor
\lfloor x \rfloor
Frequently asked questions
- How do I write Fractional Part in LaTeX?
- Type \{x\} in math mode, for example $x = \lfloor x \rfloor + \{x\}$. It works in plain LaTeX without loading any package.
- Which package do I need for \{x\}?
- None. \{x\} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \{x\} in text mode, or only in math mode?
- Both. \{x\} compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf
يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي
- أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
- ارفع صورة وحولها إلى LaTeX بسلاسة
- احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث