Section9.23

]>
Book Contents Previous Section 9.22 Factored Next Section 9.24 File Book Index

## 9.23 FactoredFunctions2

The FactoredFunctions2 package implements one operation, mapmapFactoredFunctions2, for applying an operation to every base in a factored object and to the unit.

double(x) == x + x
Type: Void
f := factor(720)

2 4 3 2 5

Type: Factored Integer

Actually, the mapmapFactoredFunctions2 operation used in this example comes from Factored itself, since double takes an integer argument and returns an integer result.

map(double,f)

2 4 4 6 2 10

Type: Factored Integer

If we want to use an operation that returns an object that has a type different from the operation's argument, the mapmapFactoredFunctions2 in Factored cannot be used and we use the one in FactoredFunctions2.

makePoly(b) == x + b
Type: Void

In fact, the ``2'' in the name of the package means that we might be using factored objects of two different types.

g := map(makePoly,f)

(x+1)(x+2)4(x+3)2(x+5)

Type: Factored Polynomial Integer

It is important to note that both versions of mapmapFactoredFunctions2 destroy any information known about the bases (the fact that they are prime, for instance).

The flags for each base are set to ``nil'' in the object returned by mapmapFactoredFunctions2.

nthFlag(g,1)

"nil"

Type: Union("nil",...)

For more information about factored objects and their use, see FactoredXmpPage and ugProblemGaloisPage in Section ugProblemGaloisNumber .

Book Contents Previous Section 9.22 Factored Next Section 9.24 File Book Index