feat(polynomialRoot): Initial implementation (linear only)

This commit is contained in:
Glen Whitney 2022-11-26 17:28:19 -05:00
parent 31add66f4c
commit de52c041e5
4 changed files with 116 additions and 73 deletions

View file

@ -45,6 +45,11 @@ describe('complex', () => {
assert.ok(!(math.equal(math.complex(45n, 3n), 45n)))
})
it('tests for reality', () => {
assert.ok(math.isReal(math.complex(3, 0)))
assert.ok(!(math.isReal(math.complex(3, 2))))
})
it('computes gcd', () => {
assert.deepStrictEqual(
math.gcd(math.complex(53n, 56n), math.complex(47n, -13n)),