aboutsummaryrefslogtreecommitdiff
path: root/src/input/stream2.input.pamphlet
blob: 1cf80cc89d43a92ce0574850ff2f4573d7b085b5 (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input stream2.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{compiler bug fix}
<<compiler bug fix>>=
)set functions compile on
@
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1991.
@
<<*>>=
<<license>>

)clear all
)set stream calculate 20
)set functions cache all
<<compiler bug fix>>
u==[i+j for i in (-4)..10 | i < 5 for j in 4.. | j < 10]
u
reduce(0::Integer,+,u)
)clear all
u(m,n)==[i for i in m..n]
u(3,6)
reduce(+,u(3,6))
reduce(+,u(3,8))
)clear all
n==10
u:=[i for i in 0..n]
v==[i for i in 0..n]
v
n==15
u
v
)clear all
n:=2
m:=3
u:=[[i*j for j in 1..n] for i in 1..m]
n:=10
u
)clear all
u==[i for i in m..n]
)set mes test off
u
)set mes test on
n:=7
m:=3
u
reduce(+,u)
n:=2
u
reduce(+,u)
m:=-3
u
reduce(+,u)
)clear all
u==[[i+j for i in 0..j] for j in 0..n]
)set mes test off
u
)set mes test on
n:=5
u
n:=10
u
n:=1
u
n:= 0
u
n:=-1
u
)clear all
)set streams calculate 10
u==[[i+j for i in 0..] for j in 0..]
u
)clear all
u(m,n)==[[i+j for j in 1..m] for i in 1..n]
u(3,6)
reduce(append,u(3,6))
)clear all
u(m,n)==[[i*j for j in m..] for i in n..]
u(3,6)
)clear all
)set streams calculate 3
[[[i+j+k for i in 0..] for j in 0..] for k in 0..]
n:=5
[[[i+j+k for i in 0..] for j in 0..] for k in 0..n]
[[[i+j+k for i in 0..j] for j in 0..k] for k in 0..]
[[[i+j+k for i in 0..j] for j in 0..k] for k in 0..n]
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}