b-equal

▸ function bEqual (a: bigint[], b: bigint[]): boolean

Defined in basic/bigint/b-equal.ts:18

Returns true if two polynomials are exactly equal by comparing coefficients, false otherwise.

example

bEqual([1n,2n,3n,4n], [1n,2n,3n,4n]); //=> true
bEqual([1n,2n,3n,4n], [1n,2n,3n,4n,5n]); //=> false

Parameters:

NameTypeDescription
abigint[]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
bbigint[]another polynomial

Returns: boolean