\subsection{autosimplify}
\label{labautosimplify}
\noindent Name: \textbf{autosimplify}\\
\phantom{aaa}activates, deactivates or inspects the value of the automatic simplification state variable\\[0.2cm]
\noindent Library names:\\
\verb|   void sollya_lib_set_autosimplify_and_print(sollya_obj_t)|\\
\verb|   void sollya_lib_set_autosimplify(sollya_obj_t)|\\
\verb|   sollya_obj_t sollya_lib_get_autosimplify()|\\[0.2cm]
\noindent Usage: 
\begin{center}
\textbf{autosimplify} = \emph{activation value} : \textsf{on$|$off} $\rightarrow$ \textsf{void}\\
\textbf{autosimplify} = \emph{activation value} ! : \textsf{on$|$off} $\rightarrow$ \textsf{void}\\
\textbf{autosimplify} : \textsf{on$|$off}\\
\end{center}
Parameters: 
\begin{itemize}
\item \emph{activation value} represents \textbf{on} or \textbf{off}, i.e. activation or deactivation
\end{itemize}
\noindent Description: \begin{itemize}

\item An assignment \textbf{autosimplify} = \emph{activation value}, where \emph{activation value}
   is one of \textbf{on} or \textbf{off}, activates respectively deactivates the
   automatic safe simplification of expressions of functions generated by
   the evaluation of commands or in argument of other commands.
    
   \sollya commands like \textbf{remez}, \textbf{taylor} or \textbf{rationalapprox} sometimes
   produce expressions that can be simplified. Constant subexpressions
   can be evaluated to dyadic floating-point numbers, monomials with
   coefficients $0$ can be eliminated. Further, expressions
   indicated by the user perform better in many commands when simplified
   before being passed in argument to a command. When the automatic
   simplification of expressions is activated, \sollya automatically
   performs a safe (not value changing) simplification process on such
   expressions.
    
   The automatic generation of subexpressions can be annoying, in
   particular if it takes too much time for not enough benefit. Further the
   user might want to inspect the structure of the expression tree
   returned by a command. In this case, the automatic simplification
   should be deactivated.
    
   If the assignment \textbf{autosimplify} = \emph{activation value} is followed by an
   exclamation mark, no message indicating the new state is
   displayed. Otherwise the user is informed of the new state of the
   global mode by an indication.
\end{itemize}
\noindent Example 1: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> autosimplify = on !;
> print(x - x);
0
> autosimplify = off ;
Automatic pure tree simplification has been deactivated.
> print(x - x);
x - x
\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 2: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> autosimplify = on !; 
> print(rationalapprox(sin(pi/5.9),7));
33 / 65
> autosimplify = off !; 
> print(rationalapprox(sin(pi/5.9),7));
33 / 65
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{print} (\ref{labprint}), \textbf{$==$} (\ref{labequal}), \textbf{!$=$} (\ref{labneq}), \textbf{prec} (\ref{labprec}), \textbf{points} (\ref{labpoints}), \textbf{diam} (\ref{labdiam}), \textbf{display} (\ref{labdisplay}), \textbf{verbosity} (\ref{labverbosity}), \textbf{canonical} (\ref{labcanonical}), \textbf{taylorrecursions} (\ref{labtaylorrecursions}), \textbf{timing} (\ref{labtiming}), \textbf{fullparentheses} (\ref{labfullparentheses}), \textbf{midpointmode} (\ref{labmidpointmode}), \textbf{hopitalrecursions} (\ref{labhopitalrecursions}), \textbf{remez} (\ref{labremez}), \textbf{rationalapprox} (\ref{labrationalapprox}), \textbf{taylor} (\ref{labtaylor})
