Skip to content

Utils.Function.trimPoly

Christian d'Heureuse edited this page Sep 25, 2026 · 1 revision

commons-math-interpolation / Utils / trimPoly

Function: trimPoly()

function trimPoly(c): Float64Array;

Defined in: Utils.ts:100

Removes the zero-valued coefficients of the highest orders from a polynomial.

At least one coefficient is kept, so a zero polynomial is returned as [0].

Parameters

c

Float64Array

The polynomial coefficients in ascending order.

Returns

Float64Array

c itself if its highest-order coefficient is not zero (or if c is empty). Otherwise a subarray() view of c, which shares the same buffer.

Clone this wiki locally