File: introExample34.tex

package info (click to toggle)
sollya 7.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 13,864 kB
  • sloc: ansic: 117,441; yacc: 8,822; lex: 2,419; makefile: 870; cpp: 76
file content (43 lines) | stat: -rw-r--r-- 1,318 bytes parent folder | download | duplicates (2)
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
43
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> 1/3 - 1/7;
Warning: rounding has happened. The value displayed is a faithful rounding to 16
5 bits of the true result.
0.19047619047619047619047619047619047619047619047619
> rationalmode = on;
Rational mode has been activated.
> 1/3 - 1/7;
4 / 21
> (2 + 1/7)^2 + (6/7)^2 + 2 * (2 + 1/7) * 6/7;
9
> rationalmode = off;
Rational mode has been deactivated.
> (2 + 1/7)^2 + (6/7)^2 + 2 * (2 + 1/7) * 6/7;
Warning: rounding has happened. The value displayed is a faithful rounding to 16
5 bits of the true result.
9
> rationalmode = on;
Rational mode has been activated.
> asin(1)/pi;
Warning: rounding has happened. The value displayed is a faithful rounding to 16
5 bits of the true result.
0.5
> sin(1/6 * pi);
Warning: rounding has happened. The value displayed is a faithful rounding to 16
5 bits of the true result.
0.5
> exp(1/7 - 3/21) / 7;
1 / 7
> rationalmode = off;
Rational mode has been deactivated.
> exp(1/7 - 3/21) / 7;
Warning: rounding has happened. The value displayed is a faithful rounding to 16
5 bits of the true result.
0.142857142857142857142857142857142857142857142857145
> print(1/7 - 3/21);
1 / 7 - 3 / 21
> rationalmode = on;
Rational mode has been activated.
> print(1/7 - 3/21);
0
\end{Verbatim}
\end{minipage}\end{center}