File: introExample34.tex

package info (click to toggle)
sollya 8.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,592 kB
  • sloc: ansic: 124,655; yacc: 7,543; lex: 2,440; makefile: 888; cpp: 77
file content (47 lines) | stat: -rw-r--r-- 1,492 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
44
45
46
47
\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.
Warning: For at least 1 of the constants displayed in decimal, rounding has happ
ened.
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.
Warning: For at least 1 of the constants displayed in decimal, rounding has happ
ened.
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}