b-negate
▸ function bNegate
(p
: bigint[]): bigint[]
Defined in basic/bigint/b-negate.ts:15
Returns the negative of the given polynomial (p -> -p).
example
bNegate([1n, -2n]); //=> [-1n, 2n]
Parameters:
Name | Type | Description |
---|---|---|
p | bigint[] | a polynomial with coefficients given densely as an array of bigints from highest to lowest power, e.g. [5n,-3n,0n] represents the polynomial 5x^2 - 3x |
Returns: bigint[]