# Examples Rounding¶


\begin{problem}
Testing precision on display and correction.
\begin{question}
\begin{variables}
\number{r}{4.2416 +4}
\number{s}{3/7}
\randdouble{c}{1}{10}
\function[calculate, display]{a}{10*pi}
\function[calculate]{b}{3/7}
\function[calculate, display]{f}{2/4}
\function{d}{a*c}
\end{variables}

\type{input.number}
\field{real}
\precision{5}

\text{
$a = \var{a}$\\
$b = \var{b}$\\
$c = \var{c}$\\\\
$r = \var{r}$\\
$s = \var{s}$\\
$f = \var{f}$\\
}
\text{$a =$}
\solution{a}

\text{$d =$}
\solution{f}

\end{question}

\begin{question}
\begin{variables}
\function{a}{3/7*pi}
\function{b}{a^2}
\end{variables}

\type{input.number}
\precision{3}
\text{
Determine the value of $a$ and $b$ with a precision of 3.
\begin{align}
a = \var{a}
b = \var{b}
\end{align}.

}
\text{$a =$}
\solution{a}

\text{$b =$}
\solution{b}

\end{question}

\begin{question}
\begin{variables}
\randdouble{d}{0}{5}
\number{a}{3.112}
\number{b}{1.223}
\function[normalize]{c}{a+b}
\end{variables}

\type{input.number}
\precision{3}

\text{
$a = \var{a}$ and $b = \var{b}$ calculate $\var{c}$\\
$c = a + b$\\
$d = \var{d}$
}
\text{$c =$}