\subsection{display}
\label{labdisplay}
\noindent Name: \textbf{display}\\
\phantom{aaa}sets or inspects the global variable specifying number notation\\[0.2cm]
\noindent Library names:\\
\verb|   void sollya_lib_set_display_and_print(sollya_obj_t)|\\
\verb|   void sollya_lib_set_display(sollya_obj_t)|\\
\verb|   sollya_obj_t sollya_lib_get_display()|\\[0.2cm]
\noindent Usage: 
\begin{center}
\textbf{display} = \emph{notation value} : \textsf{decimal$|$binary$|$dyadic$|$powers$|$hexadecimal} $\rightarrow$ \textsf{void}\\
\textbf{display} = \emph{notation value} ! : \textsf{decimal$|$binary$|$dyadic$|$powers$|$hexadecimal} $\rightarrow$ \textsf{void}\\
\textbf{display} : \textsf{decimal$|$binary$|$dyadic$|$powers$|$hexadecimal}\\
\end{center}
Parameters: 
\begin{itemize}
\item \emph{notation value} represents a variable of type \textsf{decimal$|$binary$|$dyadic$|$powers$|$hexadecimal}
\end{itemize}
\noindent Description: \begin{itemize}

\item An assignment \textbf{display} = \emph{notation value}, where \emph{notation value} is
   one of \textbf{decimal}, \textbf{dyadic}, \textbf{powers}, \textbf{binary} or \textbf{hexadecimal}, activates
   the corresponding notation for output of values in \textbf{print}, \textbf{write} or
   at the \sollya prompt.
    
   If the global notation variable \textbf{display} is \textbf{decimal}, all numbers will
   be output in scientific decimal notation.  If the global notation
   variable \textbf{display} is \textbf{dyadic}, all numbers will be output as dyadic
   numbers with Gappa notation.  If the global notation variable \textbf{display}
   is \textbf{powers}, all numbers will be output as dyadic numbers with a
   notation compatible with Maple and PARI/GP.  If the global notation
   variable \textbf{display} is \textbf{binary}, all numbers will be output in binary
   notation.  If the global notation variable \textbf{display} is \textbf{hexadecimal},
   all numbers will be output in C99/ IEEE754-2008 notation.  All output
   notations can be parsed back by \sollya, inducing no error if the input
   and output precisions are the same (see \textbf{prec}).
    
   If the assignment \textbf{display} = \emph{notation 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]
> display = decimal;
Display mode is decimal numbers.
> a = evaluate(sin(pi * x), 0.25);
> a;
0.70710678118654752440084436210484903928483593768847
> display = binary;
Display mode is binary numbers.
> a;
1.011010100000100111100110011001111111001110111100110010010000100010110010111110
11000100110110011011101010100101010111110100111110001110101101111011000001011101
010001_2 * 2^(-1)
> display = hexadecimal;
Display mode is hexadecimal numbers.
> a;
0x1.6a09e667f3bcc908b2fb1366ea957d3e3adec1751p-1
> display = dyadic;
Display mode is dyadic numbers.
> a;
33070006991101558613323983488220944360067107133265b-165
> display = powers;
Display mode is dyadic numbers in integer-power-of-2 notation.
> a;
33070006991101558613323983488220944360067107133265 * 2^(-165)
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{print} (\ref{labprint}), \textbf{write} (\ref{labwrite}), \textbf{decimal} (\ref{labdecimal}), \textbf{dyadic} (\ref{labdyadic}), \textbf{powers} (\ref{labpowers}), \textbf{binary} (\ref{labbinary}), \textbf{hexadecimal} (\ref{labhexadecimal}), \textbf{prec} (\ref{labprec})
