1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
10 * struct polynomial_term - one term descriptor of a polynomial
11 * @deg: degree of the term.
12 * @coef: multiplication factor of the term.
13 * @divider: distributed divider per each degree.
14 * @divider_leftover: divider leftover, which couldn't be redistributed.
16 struct polynomial_term {
20 long divider_leftover;
24 * struct polynomial - a polynomial descriptor
25 * @total_divider: total data divider.
26 * @terms: polynomial terms, last term must have degree of 0
30 struct polynomial_term terms[];
33 long polynomial_calc(const struct polynomial *poly, long data);