File: midpointmode.tex

package info (click to toggle)
sollya 8.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,540 kB
  • sloc: ansic: 124,655; yacc: 7,543; lex: 2,440; makefile: 888; cpp: 77
file content (42 lines) | stat: -rw-r--r-- 1,843 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\subsection{midpointmode}
\label{labmidpointmode}
\noindent Name: \textbf{midpointmode}\\
\phantom{aaa}global variable controlling the way intervals are displayed.\\[0.2cm]
\noindent Library names:\\
\verb|   void sollya_lib_set_midpointmode_and_print(sollya_obj_t)|\\
\verb|   void sollya_lib_set_midpointmode(sollya_obj_t)|\\
\verb|   sollya_obj_t sollya_lib_get_midpointmode()|\\[0.2cm]
\noindent Usage: 
\begin{center}
\textbf{midpointmode} = \emph{activation value} : \textsf{on$|$off} $\rightarrow$ \textsf{void}\\
\textbf{midpointmode} = \emph{activation value} ! : \textsf{on$|$off} $\rightarrow$ \textsf{void}\\
\textbf{midpointmode} : \textsf{on$|$off}\\
\end{center}
Parameters: 
\begin{itemize}
\item \emph{activation value} enables or disables the mode.
\end{itemize}
\noindent Description: \begin{itemize}

\item \textbf{midpointmode} is a global variable. When its value is \textbf{off}, intervals are displayed
   as usual (in the form $\left[ a;b\right]$).
   When its value is \textbf{on}, and if $a$ and $b$ have the same first significant digits,
   the interval in displayed in a way that lets one immediately see the common
   digits of the two bounds.

\item This mode is supported only with \textbf{display} set to \textbf{decimal}. In other modes of 
   display, \textbf{midpointmode} value is simply ignored.
\end{itemize}
\noindent Example 1: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> a = round(Pi,30,RD);
> b = round(Pi,30,RU);
> d = [a,b];
> d;
[3.1415926516056060791015625;3.1415926553308963775634765625]
> midpointmode=on!;
> d;
0.314159265~1/6~e1
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{on} (\ref{labon}), \textbf{off} (\ref{laboff}), \textbf{roundingwarnings} (\ref{labroundingwarnings}), \textbf{display} (\ref{labdisplay}), \textbf{decimal} (\ref{labdecimal})