\subsection{isevaluable}
\label{labisevaluable}
\noindent Name: \textbf{isevaluable}\\
\phantom{aaa}tests whether a function can be evaluated at a point \\[0.2cm]
\noindent Usage: 
\begin{center}
\textbf{isevaluable}(\emph{function}, \emph{constant}) : (\textsf{function}, \textsf{constant}) $\rightarrow$ \textsf{boolean}\\
\end{center}
Parameters: 
\begin{itemize}
\item \emph{function} represents a function
\item \emph{constant} represents a constant point
\end{itemize}
\noindent Description: \begin{itemize}

\item \textbf{isevaluable} applied to function \emph{function} and a constant \emph{constant}
   returns a boolean indicating whether or not a subsequent call to \textbf{evaluate} on
   the same function \emph{function} and constant \emph{constant} will produce a numerical
   result or NaN. This means \textbf{isevaluable} returns false iff \textbf{evaluate} will
   return NaN.

\item The command \textbf{isevaluable} is now considered DEPRECATED in \sollya.
   As checks for NaNs are now possible in Sollya, the command \textbf{isevaluable}
   can be fully emulated with a call to evaluate and a couple of tests, 
   as shown below in the last example.
\end{itemize}
\noindent Example 1: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> isevaluable(sin(pi * log(x)), 0.5);
true
> print(evaluate(sin(pi * log(x)), 0.5));
-0.82148283122563882875872566228649962370813607461095
\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 2: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> isevaluable(sin(pi * log(x)), 0);
true
> print(evaluate(sin(pi * log(x)), 0));
[-1;1]
\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 3: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> isevaluable(sin(pi * 1/x), 0.5);
true
> print(evaluate(sin(pi * 1/x), 0.5));
[-3.100365765139897619749121887390789523854170596558e-13490;5.300240158585712760
5350842426029223241500776302528e-13489]
\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 4: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> procedure isEvaluableEmulation(f, c) {
        return match evaluate(f, c) with 
                   NaN : (false)
                 [NaN;NaN] : (false)
                 default : (true);
  };
> isEvaluableEmulation(sin(pi * log(x)), 0.5);
true
> isEvaluableEmulation(sin(pi * log(x)), 0);
true
> isEvaluableEmulation(sin(pi * log(x)), -1);
false
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{evaluate} (\ref{labevaluate})
