>>  <<  Ndx  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  wd  Help  Dictionary

 Roots p.  1 1 0 Polynomial

p. c   (m;r)
p.p. c c

If e is a vector whose elements are all non-negative integers, then p.<c,.e gives the coefficients of the equivalent polynomial:

(p. <c,.e)&p. (<c,.e)&p.

There are three cases -- coefficients; multiplier and roots; multinomial (boxed matrix of coefficients and exponents):

 c p. x ↔ +/c*x^i.#c (m;r) p. x ↔ m * */x-r (

where m is a scalar; c and r are scalars or vectors; and e is a vector or matrix such that (\$e)-:(#c),(#y) . A scalar y is extended normally.

```   p. 1 0 0 1
+-+-----------------------------+
|1|_1 0.5j0.866025 0.5j_0.866025|
+-+-----------------------------+

]mr=: p. c=: 0 16 _12 2     NB. Multiplier/Roots from Coefficients
+-+-----+
|2|4 2 0|
+-+-----+

x=: 0 1 2 3 4 5
(c p. x), ((<c,.i.4)p. x), (mr p. x),: 2*(x-4)*(x-2)*(x-0)
0 6 0 _6 0 30
0 6 0 _6 0 30
0 6 0 _6 0 30
0 6 0 _6 0 30

c=: 1 3 3 1
c p. x
1 8 27 64 125 216
(x+1)^3
1 8 27 64 125 216

bc=: !~/~i.5                NB. Binomial coefficients
bc;(bc p./ x);((i.5) ^~/ x+1)
+---------+--------------------+--------------------+
|1 0 0 0 0|1  1  1   1   1    1|1  1  1   1   1    1|
|1 1 0 0 0|1  2  3   4   5    6|1  2  3   4   5    6|
|1 2 1 0 0|1  4  9  16  25   36|1  4  9  16  25   36|
|1 3 3 1 0|1  8 27  64 125  216|1  8 27  64 125  216|
|1 4 6 4 1|1 16 81 256 625 1296|1 16 81 256 625 1296|
+---------+--------------------+--------------------+

c&p. d. 1 x                 NB. First derivative of polynomial
3 12 27 48 75 108

(<1 _1 ,. 5 0) p. 3         NB. Coefficients / Exponents
242

_1 0 0 0 0 1 p. 3
242

p. <1 _1 ,. 5 0             NB. Coefficients / Exponents to Coefficients
_1 0 0 0 0 1

c=: _1 1 2 3 [ e=: 4 2\$2 1 1 1 1 2 0 2
c,.e                        NB. Coefficients / Exponents
_1 2 1
1 1 1
2 1 2
3 0 2

(<c,.e) p. <y=:2.5 _1       NB. Multinomial
11.75

c +/ .* e */ .(^~) y
11.75
```
Note that (<c,.e)p.<y is a “proper” multinomial only if the elements of e are all non-negative integers. In general the powers are not so limited, as in the weighted sum of square root and 4-th root:
```   ] t=: <2 3,.1r2 1r4
+-----+
|2 1r2|
|3 1r4|
+-----+

(t p. 16), +/ 2 3 * 16 ^ 1r2 1r4
14 14
```
The variant p.!.s is a stope polynomial; it differs from p. in that its definition is based upon the stope ^!.s instead of on ^ (power).

>>  <<  Ndx  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  wd  Help  Dictionary