<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":kmath-functions:dokkaHtmlPartial/commonMain"><divclass="symbol monospace"><spanclass="token keyword"></span><spanclass="token keyword">val </span><ahref="coefficients.html">coefficients</a><spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="index.html">C</a><spanclass="token operator">></span><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/SciProgCentre/kmath/tree/master/kmath-functions/src/commonMain/kotlin/space/kscience/kmath/functions/Polynomial.kt#L51">source</a>)</span></span></div><pclass="paragraph">List that contains coefficients of the polynomial.</p><pclass="paragraph">Every monomial \(a x^d\) is stored as a coefficient \(a\) placed into the list at index \(d\). For example, coefficients of a polynomial \(5 x^2 - 6\) can be represented as</p><divclass="sample-container"><pre><codeclass="block lang-kotlin"theme="idea">listOf(<br> -6, // -6 +<br> 0, // 0 x +<br> 5, // 5 x^2<br>)</code></pre><spanclass="top-right-position"><spanclass="copy-icon"></span><divclass="copy-popup-wrapper popup-to-left"><spanclass="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><pclass="paragraph">and also as</p><divclass="sample-container"><pre><codeclass="block lang-kotlin"theme="idea">listOf(<br> -6, // -6 +<br> 0, // 0 x +<br> 5, // 5 x^2<br> 0, // 0 x^3<br> 0, // 0 x^4<br>)</code></pre><spanclass="top-right-position"><spanclass="copy-icon"></span><divclass="copy-popup-wrapper popup-to-left"><spanclass="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><pclass="paragraph">It is not prohibited to put extra zeros at end of the list (as for \(0x^3\) and \(0x^4\) in the example). But the longer the coefficients list the worse performance of arithmetical operations performed on it. Thus, it is recommended not to put (or even to remove) extra (or useless) coefficients at the end of the coefficients list.</p><spanclass="kdoc-tag"><spanclass="kdoc-tag"></span></span></div></div>