aboutsummaryrefslogtreecommitdiff
path: root/src/input/polycoer.input.pamphlet
blob: dd2c598bc703115be20707944366e37c13e25a86 (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
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input polycoer.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1991.
@
<<*>>=
<<license>>

-- This file demonstrates the capabilities of the interpreter to
-- perform coercions among different polynomial types.
)clear all
u : UP(x,COMPLEX INT)
u := (2+3*%i)*x**5 - 7*x**4 +x**2 + 89
m : MPOLY([x,y,z],COMPLEX INT)
m := u
m := m*y - z**2
m1 : MPOLY([r,z,t,x,s,y],COMPLEX INT)
m1 := m
v : DMP([x,y,z],COMPLEX INT)
v := u
u := v
v1 : DMP([r,z,t,x,s,y],COMPLEX INT)
v1 := v
v := m
v1 := m1
)clear all
u : DMP([x,y],INT)
f : UP(x,UP(y,INT))
u := x + y
f := u
u := x**2*y**9 - x**2*y**2
f := u
)clear all
u : DMP([z,x,y],INT)
f : UP(x,DMP([y,z],INT))
u := x + y + z
f := u
u := x**2*y - z*x**2 + y*z - x**3*y*z + 3
f := x**2*y - z*x**2 + y*z - x**3*y*z + 3
f := u
)clear all
u : DMP([x,y,z,w],INT)
f : UP(w,DMP([y,z],INT))
u := y**2 - w**5*y**2 - z*w + 3
f := y**2 - w**5*y**2 - z*w + 3
f := u
)clear all
(x1,x2,x3) : DMP([a,b,c,d,e,f],Fraction INT)
x1 := 2*a + 3*b - c
x2 := 3 - 3*e + f
x3 := a + b + c + d + e + f
l1 : List DMP([a,b,c,d,e,f],Fraction INT)
l2 : List UP(f,DMP([a,b,c,d,e],Fraction INT))
l1 := [x1,x2,x3]
l2 := l1
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}