R: Addition in polynomial representation

poly_sum {lhs} | R Documentation

## Addition in polynomial representation

### Description

Addition in polynomial representation

### Usage

    poly_sum(p, n, p1, p2)

### Arguments

`p` | modulus
`n` | length of polynomial 1 and 2
`p1` | polynomial vector 1
`p2` | polynomial vector 2

### Value

the sum of p1 and p2

### Examples

    gf <- create_galois_field(4)
    a <- poly_sum(gf$p, gf$n, c(1, 0), c(0, 1))
    stopifnot(all(a == c(1, 1)))

[Package lhs version 1.1.3 Index]