Glen Whitney
66cbccfbbe
And use it to define negate and add for Complex numbers in a way that is independent of component types. Also add a bigint type and verify that pocomath will then handle Gaussian integers "for free".
5 lines
112 B
JavaScript
5 lines
112 B
JavaScript
import './BigInt.mjs'
|
|
export const add = {
|
|
'...bigint': [[], addends => addends.reduce((x,y) => x+y, 0n)],
|
|
}
|