Using \DeclarePairedDelimiter from mathtools, you could define macros \ceil and \floor, which will scale the delimiters properly (if starred):
\documentclass{minimal}
\usepackage{mathtools}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\begin{document}
\begin{equation*}
\floor*{\frac{x}{2}} \leq \frac{x}{2} \leq \ceil*{\frac{x}{2}}
\end{equation*}
\end{document}
Result:

Using \DeclarePairedDelimiter from mathtools, you could define macros \ceil and \floor, which will scale the delimiters properly (if starred):
\documentclass{minimal}
\usepackage{mathtools}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\begin{document}
\begin{equation*}
\floor*{\frac{x}{2}} \leq \frac{x}{2} \leq \ceil*{\frac{x}{2}}
\end{equation*}
\end{document}
Result:

You can define your own macro via the
\defcommand anywhere in your document. For example\def\lc{\left\lceil} \def\rc{\right\rceil}and then just write
\lc x \rc.Or you use the
\providecommandin the preamble, e.g.\providecommand{\myceil}[1]{\left \lceil #1 \right \rceil }to simply use
\myceil{x}in your document.- Use an editor, like vim, that allows for defining shortcuts for quick and efficient editing.
- And, finally, don't forget about readability of your tex document. Check out this thread for some instructive comments on how to write efficient and readable tex math docs.
notation - Mathematical representation of Floor( ) and Ceil( ) for various decimal places. - Mathematics Stack Exchange
How to ceil or floor the value of length command - LaTeX.org
Whole and Fractional part symbols? - LaTeX.org
tikz - Why can't I use `int`, `mod`, `floor` even if I added the package where these functions are defined, in LaTeX? - Stack Overflow
How do you represent a big floor symbol in LaTeX?
How do you represent a floor symbol with LaTeX?
What other ways can a floor symbol be represented?
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. $$
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}}}$.
\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.
Here is a simple xparse implementation of \ceil, similar to that provided by mathtools' \DeclarePairedDelimiter:

\documentclass{article}
\usepackage{xparse}% http://ctan.org/pkg/xparse
\NewDocumentCommand{\ceil}{s O{} m}{%
\IfBooleanTF{#1} % starred
{\left\lceil#3\right\rceil} % \ceil*[..]{..}
{#2\lceil#3#2\rceil} % \ceil[..]{..}
}
\begin{document}
\[\ceil[\big]{x} \quad \ceil[\Big]{x} \quad \ceil[\bigg]{x} \quad \ceil[\Bigg]{x} \quad \ceil*[\big]{\frac{1}{2}}\]
\end{document}
The optional argument is ignored in the starred version of \ceil*[..]{..}.
I know I can express floor(a) in many ways involving summation, ceiling functions, etc. Is there a way to express a general floor function without the use of the floor function itself or the ceiling function?