![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 /* 0003 * Copyright (C) 2020 BAIKAL ELECTRONICS, JSC 0004 */ 0005 0006 #ifndef _POLYNOMIAL_H 0007 #define _POLYNOMIAL_H 0008 0009 /* 0010 * struct polynomial_term - one term descriptor of a polynomial 0011 * @deg: degree of the term. 0012 * @coef: multiplication factor of the term. 0013 * @divider: distributed divider per each degree. 0014 * @divider_leftover: divider leftover, which couldn't be redistributed. 0015 */ 0016 struct polynomial_term { 0017 unsigned int deg; 0018 long coef; 0019 long divider; 0020 long divider_leftover; 0021 }; 0022 0023 /* 0024 * struct polynomial - a polynomial descriptor 0025 * @total_divider: total data divider. 0026 * @terms: polynomial terms, last term must have degree of 0 0027 */ 0028 struct polynomial { 0029 long total_divider; 0030 struct polynomial_term terms[]; 0031 }; 0032 0033 long polynomial_calc(const struct polynomial *poly, long data); 0034 0035 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |