printf: Remove unused 'bprintf'
[drm/drm-misc.git] / include / linux / polynomial.h
blob9e074a0bb6fa715646d7df79a043d376dfd9a620
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
4 */
6 #ifndef _POLYNOMIAL_H
7 #define _POLYNOMIAL_H
9 /*
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 {
17 unsigned int deg;
18 long coef;
19 long divider;
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
28 struct polynomial {
29 long total_divider;
30 struct polynomial_term terms[];
33 long polynomial_calc(const struct polynomial *poly, long data);
35 #endif