22 Commits

Author SHA1 Message Date
Glen Whitney
faf249b6c0
feature: add function bernoulli to calculate Bernoulli numbers (#3551) 2025-10-29 10:47:11 +01:00
Jos de Jong
1f05a35d68
chore: convert CJS files to ESM (#3204) 2024-05-22 08:46:14 +02:00
Jos de Jong
97e743290b chore: describe all parameters of approx.deepEqual 2023-09-20 08:50:25 +02:00
Jos de Jong
fca1d492fd Fix tests on IE11 2022-04-19 14:15:10 +02:00
Jos de Jong
da4fdd465d Make IE11 happy 2022-04-19 13:54:59 +02:00
Jos de Jong
cc193bf96b Add some extra, temporary output to approx equal 2022-04-19 13:49:22 +02:00
yifanwww
6562edfb21
feat: Improve approx.deepEqual, to support epsilon (#2504)
fix(approx): Make `approx.deepEqual` respect tolerance argument

  Tests already contained calls of the form 
  `approx.deepEqual(A, B, epsilon)` but the comparison tolerance
  argument epsilon was being silently ignored. This commit fixes
  that oversight and corrects a couple of tests to reflect the finer-
  grained testing.

Co-authored-by: Glen Whitney <glen@studioinfinity.org>
2022-03-27 22:32:59 -07:00
Harry Sarson
462f46947f fix qr and sign edge cases (#1670)
* fix qr and sign edge cases

qr() was throwing an error if the pivots of a matrix were zero.
This commit fixes that and ensures that the results are consistant
with wolfram alpha.

Whilst doing this I found a bug in complex.js, I have added a work
around but we should flag this upstream.

I also addressed the long standing concerns about assert statements
within the body of the qr function.

Fixes #1669
Fixes #942

* further improvements to qr and sign

mainly fixing things I got wrong in previous commit

* add array test

* fix: remove only from tests and disallow

Uses mochas `--forbid-only` flag as advised by
https://github.com/standard/standard/issues/988
2019-11-18 20:03:09 +01:00
jos
d8a4f3a00a Update to standard@13.0.2 2019-07-20 13:46:31 +02:00
greenkeeper[bot]
c5971b371a Update standard to the latest version 🚀 (#1226)
* chore(package): update standard to version 12.0.0

* update to new lint version with --fix

I believe this mainly adds whitespace to `{}`'s.

* Replace assert.equal with assert.strictEqual

This breaks a lot of tests which I will endevour to fix in the next
commits.

* Fix most errors due to assert.strictEquals

Some instances of `strictEquals` are replaced by `deepEquals`.
`toString` has been used to make some string comparisions explicit.
Tests will still fail untill #1236 and #1237 are fixed.

* Fix assertion erros due to -0

With node 10, assert.strictEqual no longer considers `0 === -0`.
I missed these first time round as I was using node 8.

* Put toString correct side of bracket

I was converting the constructor to a string rather
than the result of the computation. Oops.

* Fixed #1236: quantileSeq has inconsistant return

* Update package-lock

* Fixed #1237: norm sometimes returning a complex number instead of number

* Fix cli tests

* More changes for standardjs, and fixes in unit tests
2018-09-08 16:33:58 +02:00
jos
f1ce473457 Consistend camel case naming of variables and functions 2018-06-13 16:09:51 +02:00
jos
b3b96749bf Refactored var into const/let, and removed a lot of semicolons 2018-06-13 12:21:14 +02:00
jos
024b2a9e26 Fix most lint errors using npx standard --fix 2018-06-10 20:28:27 +02:00
jos
bbfa7d51df Fixed #484, #555: inaccuracy of math.sinh. Also using ES6 Math functions when available 2016-04-03 13:47:57 +02:00
jos
8edf472478 Upgraded to typed-function v0.6.1, more functions refactored. 2015-02-07 20:29:32 +01:00
josdejong
6a6b5c3e61 Replaced all x instanceof Array with Array.isArray(x) 2013-08-04 14:30:38 +02:00
josdejong
19b507b9f0 Refactored all code to 2 space indentation 2013-08-04 14:07:47 +02:00
josdejong
47980ca81b Implemented custom node handler in the parser 2013-06-26 13:19:15 +02:00
josdejong
01400af0db Fixed Complex constructor not accepting NaN as parameter (see also issue 14) 2013-06-13 20:11:50 +02:00
josdejong
84552d133e More tests 2013-05-06 21:54:57 +02:00
josdejong
f0c6bad960 Improved test methods approx.equal and approx.deepEqual. 2013-05-05 18:34:54 +02:00
josdejong
31a034cc2c Splitted all tests in separate files: one file per function 2013-05-05 15:38:28 +02:00