aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/pages/FR2.ht
blob: f2c00049af43b5402469ecfeeddedfa0e1635722 (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
% Copyright The Numerical Algorithms Group Limited 1992-94. All rights reserved.
% !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk.
\newcommand{\FactoredFunctionsTwoXmpTitle}{FactoredFunctions2}
\newcommand{\FactoredFunctionsTwoXmpNumber}{9.23}
%
% =====================================================================
\begin{page}{FactoredFunctionsTwoXmpPage}{9.23 FactoredFunctions2}
% =====================================================================
\beginscroll

%%
%% fr2.htex
%%
%% FactoredFunctions2
%%

The \spadtype{FactoredFunctions2} package implements one operation,
\spadfunFrom{map}{FactoredFunctions2}, for applying an operation to every
base in a factored object and to the unit.
\xtc{
}{
\spadpaste{double(x) == x + x \bound{double}}
}
\xtc{
}{
\spadpaste{f := factor(720) \bound{f}}
}
\xtc{
Actually, the \spadfunFrom{map}{FactoredFunctions2} operation used
in this example comes from \spadtype{Factored} itself, since
\userfun{double} takes an integer argument and returns an integer
result.
}{
\spadpaste{map(double,f) \free{f}\free{double}}
}
\xtc{
If we want to use an operation that returns an object that has a type
different from the operation's argument,
the \spadfunFrom{map}{FactoredFunctions2} in \spadtype{Factored}
cannot be used and we use the one in \spadtype{FactoredFunctions2}.
}{
\spadpaste{makePoly(b) == x + b \bound{makePoly}}
}
\xtc{
In fact, the ``2'' in the name of the package means that we might
be using factored objects of two different types.
}{
\spadpaste{g := map(makePoly,f) \free{f}\free{makePoly}\bound{g}}
}
It is important to note that both versions of \spadfunFrom{map}{FactoredFunctions2}
destroy any information known about the bases (the fact that they are prime,
for instance).
\xtc{
The flags for each base are set to ``nil'' in the object returned
by \spadfunFrom{map}{FactoredFunctions2}.
}{
\spadpaste{nthFlag(g,1) \free{g}}
}

For more information about factored objects and their use, see
\downlink{`Factored'}{FactoredXmpPage}\ignore{Factored} and
\downlink{``\ugProblemGaloisTitle''}{ugProblemGaloisPage} in Section \ugProblemGaloisNumber\ignore{ugProblemGalois}.
\endscroll
\autobuttons
\end{page}
%