Glen Whitney
f68c7bd1fb
This allows types to be collected; prior to this commit they were conflicting from different modules. Uses this fix to extend sqrt to bigint, with the convention that it is undefined for non-perfect squares when 'predictable' is false and is the "best" approximation to the square root when 'predictable' is true. Furthermore, for negative bigints, you might get a Gaussian integer when predictable is false; or you will just get your argument back when 'predictable' is true because what other bigint could you give back for a negative bigint? Also had to modify tests on the sign in sqrt(Complex) and add functions 'zero' and 'one' to get types to match, as expected in #27. Adds numerous tests. Resolves #26. Resolves #27.
30 lines
713 B
Plaintext
30 lines
713 B
Plaintext
{
|
|
name: 'pocomath',
|
|
version: '0.0.0',
|
|
description: 'A little proof-of-concept for organizing mathjs by module inclusion, avoiding factory functions.',
|
|
main: 'index.js',
|
|
scripts: {
|
|
'test:filecase': '!(find . | sort -f | uniq -i -c | grep -v " 1 ")',
|
|
'test:unit': 'npx mocha --recursive',
|
|
test: 'pnpm test:filecase && pnpm test:unit',
|
|
},
|
|
repository: {
|
|
type: 'git',
|
|
url: 'https://code.studioinfinity.org/glen/picomath.git',
|
|
},
|
|
keywords: [
|
|
'math',
|
|
'algebra',
|
|
],
|
|
author: 'Glen Whitney',
|
|
license: 'Apache-2.0',
|
|
type: 'module',
|
|
devDependencies: {
|
|
mocha: '^10.0.0',
|
|
},
|
|
dependencies: {
|
|
'bigint-isqrt': '^0.2.1',
|
|
'typed-function': '^3.0.0',
|
|
},
|
|
}
|