GNU Compiler Collection (GCC) Internals: Arithmetic on poly_ints

Next: Alignment of `poly_int`s, Previous: Comparisons involving `poly_int`, Up: poly_int [Contents][Index]

### 10.4 Arithmetic on `poly_int`s

Addition, subtraction, negation and bit inversion all work normally for `poly_int`s. Multiplication by a constant multiplier and left shifting by a constant shift amount also work normally. General multiplication of two `poly_int`s is not supported and is not useful in practice.

Other operations are only conditionally supported: the operation might succeed or might fail, depending on the inputs.

This section describes both types of operation.