\begin{patch}{DecimalExpansionXmpPagePatch1}
\begin{paste}{DecimalExpansionXmpPageFull1}{DecimalExpansionXmpPageEmpty1}
\pastebutton{DecimalExpansionXmpPageFull1}{\hidepaste}
\tab{5}\spadcommand{r := decimal(22/7)\bound{r }}
\indentrel{3}\begin{verbatim}
          ______
   (1)  3.142857
                                 Type: DecimalExpansion
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPageEmpty1}
\begin{paste}{DecimalExpansionXmpPageEmpty1}{DecimalExpansionXmpPagePatch1}
\pastebutton{DecimalExpansionXmpPageEmpty1}{\showpaste}
\tab{5}\spadcommand{r := decimal(22/7)\bound{r }}
\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPagePatch2}
\begin{paste}{DecimalExpansionXmpPageFull2}{DecimalExpansionXmpPageEmpty2}
\pastebutton{DecimalExpansionXmpPageFull2}{\hidepaste}
\tab{5}\spadcommand{r + decimal(6/7)\free{r }}
\indentrel{3}\begin{verbatim}
   (2)  4
                                 Type: DecimalExpansion
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPageEmpty2}
\begin{paste}{DecimalExpansionXmpPageEmpty2}{DecimalExpansionXmpPagePatch2}
\pastebutton{DecimalExpansionXmpPageEmpty2}{\showpaste}
\tab{5}\spadcommand{r + decimal(6/7)\free{r }}
\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPagePatch3}
\begin{paste}{DecimalExpansionXmpPageFull3}{DecimalExpansionXmpPageEmpty3}
\pastebutton{DecimalExpansionXmpPageFull3}{\hidepaste}
\tab{5}\spadcommand{[decimal(1/i) for i in 350..354]}
\indentrel{3}\begin{verbatim}
   (3)
        ______    ______         __
   [0.00285714, 0.002849, 0.0028409,
      ________________________________
    0.00283286118980169971671388101983,

     0.0
       OVERBAR
          02824858757062146892655367231638418079096045197
            74011299435
     ]
                           Type: List(DecimalExpansion)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPageEmpty3}
\begin{paste}{DecimalExpansionXmpPageEmpty3}{DecimalExpansionXmpPagePatch3}
\pastebutton{DecimalExpansionXmpPageEmpty3}{\showpaste}
\tab{5}\spadcommand{[decimal(1/i) for i in 350..354]}
\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPagePatch4}
\begin{paste}{DecimalExpansionXmpPageFull4}{DecimalExpansionXmpPageEmpty4}
\pastebutton{DecimalExpansionXmpPageFull4}{\hidepaste}
\tab{5}\spadcommand{decimal(1/2049)}
\indentrel{3}\begin{verbatim}
   (4)
   0.
     OVERBAR
        0004880429477794045876037091264031234748657881893
          60663738408979990239141044411908247925817471937
          53050268423621278672523182040019521717911176183
          50414836505612493899463152757442654953635919960
          95656417764763299170326988775012201073694485114
          69009272816007808687164470473401659346022449975
          59785261102977061981454367984382625671059053196
          6813079551
                                 Type: DecimalExpansion
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPageEmpty4}
\begin{paste}{DecimalExpansionXmpPageEmpty4}{DecimalExpansionXmpPagePatch4}
\pastebutton{DecimalExpansionXmpPageEmpty4}{\showpaste}
\tab{5}\spadcommand{decimal(1/2049)}
\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPagePatch5}
\begin{paste}{DecimalExpansionXmpPageFull5}{DecimalExpansionXmpPageEmpty5}
\pastebutton{DecimalExpansionXmpPageFull5}{\hidepaste}
\tab{5}\spadcommand{p := decimal(1/4)*x^2 + decimal(2/3)*x + decimal(4/9)\bound{p }}
\indentrel{3}\begin{verbatim}
             2     _      _
   (5)  0.25x  + 0.6x + 0.4
                     Type: Polynomial(DecimalExpansion)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPageEmpty5}
\begin{paste}{DecimalExpansionXmpPageEmpty5}{DecimalExpansionXmpPagePatch5}
\pastebutton{DecimalExpansionXmpPageEmpty5}{\showpaste}
\tab{5}\spadcommand{p := decimal(1/4)*x^2 + decimal(2/3)*x + decimal(4/9)\bound{p }}
\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPagePatch6}
\begin{paste}{DecimalExpansionXmpPageFull6}{DecimalExpansionXmpPageEmpty6}
\pastebutton{DecimalExpansionXmpPageFull6}{\hidepaste}
\tab{5}\spadcommand{q := differentiate(p, x)\free{p }\bound{q }}
\indentrel{3}\begin{verbatim}
                 _
   (6)  0.5x + 0.6
                     Type: Polynomial(DecimalExpansion)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPageEmpty6}
\begin{paste}{DecimalExpansionXmpPageEmpty6}{DecimalExpansionXmpPagePatch6}
\pastebutton{DecimalExpansionXmpPageEmpty6}{\showpaste}
\tab{5}\spadcommand{q := differentiate(p, x)\free{p }\bound{q }}
\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPagePatch7}
\begin{paste}{DecimalExpansionXmpPageFull7}{DecimalExpansionXmpPageEmpty7}
\pastebutton{DecimalExpansionXmpPageFull7}{\hidepaste}
\tab{5}\spadcommand{g := gcd(p, q)\free{p q }\bound{g }}
\indentrel{3}\begin{verbatim}
              _
   (7)  x + 1.3
                     Type: Polynomial(DecimalExpansion)
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{DecimalExpansionXmpPageEmpty7}
\begin{paste}{DecimalExpansionXmpPageEmpty7}{DecimalExpansionXmpPagePatch7}
\pastebutton{DecimalExpansionXmpPageEmpty7}{\showpaste}
\tab{5}\spadcommand{g := gcd(p, q)\free{p q }\bound{g }}
\end{paste}\end{patch}

