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

)cl all

--  Examples of all the factor functions in the system.

-- factorization of integer numbers
n:=45234258258293
factor n

-- factorization of gaussian integers
m:(Complex Integer) := 1324567+%i*53523582
factor m

-- factorization of polynomials over finite fields
u:UP(x,PF(19)) :=3*x**4+2*x**2+15*x+18
factor u

-- factorization of polynomials over the integers
v:UP(x,INT):= (4*x**3+2*x**2+1)*(12*x**5-x**3+12)
factor v

-- factorization of multivariate polynomial over the integers
w:MPOLY([x,y,z],INT) :=(x**2-y**2-z**2)*(x**2+y**2+z**2)*(z*y+3*z)
factor w

-- factorization of univariate and multivariate over the rational numbers
f:MPOLY([x,y,z],FRAC INT) :=(4/9*x**2-1/16)*(x**3/27+125)
factor f

-- factorization over rational functions
g:DMP([x,y],FRAC POLY INT):=a**2*x**2/b**2 -c**2*y**2/d**2
factor g

-- decomposition of a rational function
r:FRAC POLY INT:= (a**3/b**3-c**3/(b+1)**3)*(a*d+a/c)
factorFraction r

-- factorization over simple algebraic extensions
aa|aa**2+aa+1
p:UP(x,SAEaa) :=(x**3+aa**2*x+1)*(aa*x**2+aa*x+aa)**2
factor(p)$SAEFACT(UP('aa,FRAC INT),SAEaa,UP(x,SAEaa))

-- factorization over algebraic numbers
a:=rootOf(a**2+3)$AN
factor(x**2+x+1,[a])
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}