Ask Your Question

Revision history [back]

As a workaround, one could do the following:

\documentclass{article}
\usepackage{sagetex}
\begin{document}
    \begin{sagesilent}
        a = ZZ.random_element(1,20)
        b = ZZ.random_element(1,20)
        if a < b:
            a, b = b, a
    \end{sagesilent}
    $\sage{a}-\sage{b}$
\end{document}