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}$\\
      } 
      \begin{answer}
        \text{$a = $}
        \solution{a}
      \end{answer}

      \begin{answer}
        \text{$d = $}
        \solution{f}
      \end{answer}

    \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}.

      } 
      \begin{answer}
        \text{$a = $}
        \solution{a}
      \end{answer}

      \begin{answer}
        \text{$b = $}
        \solution{b}
      \end{answer}

    \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}$
      } 
      \begin{answer}
        \text{$c = $}
        \solution{c}
      \end{answer}

    \end{question}

  \end{problem}

Add picture from clipboard (Maximum size: 500 MB)