4454 Commits

Author SHA1 Message Date
Jos de Jong
4af3c21341 Update history and authors 2021-05-16 13:35:45 +02:00
jhugman
e80995d52d
Add support for scopes with get and set methods (#2166)
* Add support for scopes with get and set methods

* Fix build for node v12

* Fixup cli and parser tests

* Add tests for simplify and evaluate

* Add example for a custom scope object

* Function calls need child scopes

* Transitionary step: Separate Safe and Scope Property calls

* Renamed identifiers in FunctionNode

* Evaluate with ObjectScopeWrapper

* Simplify tests passing

* Assume all scopes are map-like. Except parser

* Remove isMapLike check in customs.*SafeProperty() methods

* Change MapLike to Map

* Move keywords from an Object to a Set

* Move ScopeProperty functions in to scope.js

* Removed deprecation warning

* Rename scope.js to map.js

* Rename ScopeProperty to MapProperty

* Add tests and docs for map.js

* Put back the micro-optimization of function calls

* Use Map in the parser

* Called scope methods directly in cli.js

* Coercing of scope into a Map is done in Node, not evaluate

* Move createSubScope to its own file

* Fixup following self-review

* Add scope docs

* Final self-review changes

* Address reviewer comments

* Remove MapProperty witness marks

* Converted broken benchmark possibly lost in a rebase

* Use bare map as scope in benchmark

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2021-05-16 13:33:01 +02:00
Jos de Jong
7ed12ccd70 Upgrade to fraction.js@4.1.0, and integrate support for pow of rational exponents 2021-05-16 10:22:36 +02:00
Jos de Jong
bacfd5b66d Fix error caused by round off issue in IE 2021-05-13 19:09:56 +02:00
Jos de Jong
7f762f94f3 Update history 2021-05-13 18:58:35 +02:00
Javier Marín
fe7cf0387b
fix: Webpack v5 Error: Module not found: Package path ./lib/esm/number is not exported from package @node_modules\mathjs (#2213) 2021-05-13 18:56:49 +02:00
Jos de Jong
85e04c21f5 Update to complex.js@2.0.13 (fixing #2211) 2021-05-12 17:18:19 +02:00
Jos de Jong
410f5348ea Fix benchmarks not running (must load as CommonJS files) 2021-05-12 11:39:19 +02:00
Michal Grňo
435a6a0879
Fix “AIAO-MIMO” of my previous PRs (#2210)
* fix aiao-mimo of eigs(m)

* fix aiao-mimo of matrixFromFunction
2021-05-12 10:34:40 +02:00
Jos de Jong
477906d65a Fix #2123: add type definitions for functions row and column 2021-05-09 15:31:03 +02:00
Jos de Jong
40f515f9a1 Fix #2185: Fix TypeScript definition of unit division, which can also return a number 2021-05-09 15:29:12 +02:00
Jos de Jong
14c730ba53 Fix #2019: Remove null from the TypeScript definitions 2021-05-09 15:26:52 +02:00
Jos de Jong
e004d166d3 Update history and authors list 2021-05-09 15:26:47 +02:00
Meow
2b402f7cc3
Add type declaration of DefinitelyTyped (#2192)
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2021-05-09 15:20:27 +02:00
Jos de Jong
efb17e56d5
Replace Sponsor button image 2021-05-09 14:02:55 +02:00
Jos de Jong
208df48ffd
Add github sponsor button in readme (see #2204) 2021-05-09 13:53:34 +02:00
Jos de Jong
78ba2ee76a Some updates in the docs to make the doc generator happy 2021-05-09 11:03:30 +02:00
Jos de Jong
95bb86a452 Update dependencies 2021-05-09 10:39:13 +02:00
Jos de Jong
df551dc1e6 rename createComplex to createComplexEigs to deduplicate (there is already a function createComplex) 2021-05-09 10:38:34 +02:00
Jos de Jong
99dbd0a83d Update history 2021-05-09 10:28:08 +02:00
Michal Grňo
d7a5693e91
Matrix creation and conversion methods (#2155)
* made dense and sparse matrices iterable, fixed #1184

* added matrixFromFunction, fixes #2153

* added tests for matrixFromFunction

* added matrixFromRows

* added matrixFromColumns

* added rows() and columns() for dense matrix

* improved sparse documentation a tiny bit

* fix linting issues

* added matrixFromRow/Column to seealso of row and column

* removed unnecessary duplication from matrixFromRows/Columns

* added babel runtime

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2021-05-09 10:26:16 +02:00
Jos de Jong
e163032ad2 Update history and authors list 2021-04-18 10:55:05 +02:00
Michal Grňo
9e8deb5c86
General eigenproblem algorithm (#1743)
* split the eigs function into multiple algorithms

* moved checks and coersions to eigs.js, made them more robust

* fix little bugs, make im and re more robust

* Implemented matrix balancing algorithm

* fix typos

* a draft of reduction to Hessenberg matrix

* finished implementation of reduction to Hessenberg

* fix Hessenberg elimination for complex numbers

* implemented non-shifted explicit QR algorithm for real matrices

* implemented vector computation, won't work untill usolve is fixed

* refactored to match yarn lint

* some minor changes

* solve merge conflicts

* refactored and re-fixed #1789

* some old uncommited changes

* fix small problems introduced by merging

* done some polishing

* improved jsdoc description of eigs

* little changes in jsdoc

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2021-04-18 10:52:51 +02:00
Jos de Jong
c23d312db6 Update history and authors list 2021-04-14 14:12:49 +02:00
烧风
32113e0b44
Fix pickRandom having no name (#2181) 2021-04-14 14:10:56 +02:00
Jos de Jong
e6af8ec92a Fix #2167: typo in error message 2021-04-14 10:07:55 +02:00
Jos de Jong
1757afb0e0 Fix #2169: mathjs requesting @babel/runtime dependency. Publish v9.3.2 v9.3.2 2021-04-12 19:44:13 +02:00
Jos de Jong
e6e6002f7b Publish v9.3.1 v9.3.1 2021-04-10 16:45:19 +02:00
Jos de Jong
c6cbf55389 Fix #2150, #660: give a clear error "Error: Undefined function ..." instead when
evaluating a non-existing function, and expose internal functions `FunctionNode.onUndefinedFunction(name)` and `SymbolNode.onUndefinedSymbol(name)`
2021-04-10 13:38:04 +02:00
Jos de Jong
64a52a54d1 Add babel transform-runtime (needed for #2155) 2021-04-10 11:28:57 +02:00
Jos de Jong
5ff48d009f Update history and authors list 2021-04-10 10:17:16 +02:00
Viktor
91141bbbb6
Miller–Rabin primality test (#2139)
* Miller–Rabin primality test

* add tests for some big numbers

* Update isPrime.js

* Update isPrime.js

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2021-04-10 10:14:16 +02:00
Jos de Jong
47a493d70a Merge remote-tracking branch 'origin/develop' into develop 2021-04-07 14:37:01 +02:00
Jos de Jong
5c5a05a6f8 Fix #2160: wrong year mentioned of the last two versions in the history 2021-04-07 14:36:51 +02:00
Michal Grňo
2d83c394a9
fixed a link in the comments of usolveAll and lsolveAll (#2154)
* fixed a link in the comments of usolveAll

The overleaf link in `usolveAll` didn't work.

* fixed link in lsolveAll
2021-04-07 14:17:11 +02:00
Jos de Jong
06052ecc86 Fix #2142: clarify the meaning of matrix dimensions in the docs 2021-04-05 14:44:50 +02:00
Jos de Jong
1df5b44037 Update devDependencies 2021-03-31 15:20:40 +02:00
Jos de Jong
c5909a34b5 Remove badge for BRIIM, it's unactive for 9 months now 2021-03-13 17:46:17 +01:00
Tom Hu
69056f8564
Add Codecov badge to README (#2134) 2021-03-13 17:44:49 +01:00
Jos de Jong
4a9f442495 Revert to karma-webpack@4 again 2021-03-10 15:11:51 +01:00
Jos de Jong
4cdc00f439 Update devDependencies (second try ;) ) 2021-03-10 15:07:19 +01:00
Jos de Jong
0d67b4b0f0 Revert "Update devDependencies"
This reverts commit 7ecca277
2021-03-10 15:00:28 +01:00
Jos de Jong
7ecca277ab Update devDependencies 2021-03-10 14:41:52 +01:00
Jos de Jong
d0df34dcb5 Publish v9.3.0 v9.3.0 2021-03-10 14:12:56 +01:00
Jos de Jong
3ab6bab83e Update history 2021-03-10 09:03:05 +01:00
Colin Holzman
90e15c6d95
Support for parsing non decimal numbers with radix point (#2122)
* Basic untested support for parsing non decimal numbers with radix point.

* Added some documentation for function parseNonDecimalWithRadix.

* Renamed variable in BigNumber constructor.

Not related to current feature branch but is a good change.

* Improved some variable and function names in number.js and fixed an error when parsing octal numbers with radix point.

* Added some tests and fixed linter issues.

* Added some documentation on new syntax.

* Added more tests.

* Added more tests for edge cases.
2021-03-10 09:01:08 +01:00
Jos de Jong
1587d12389 Fix #2128: typo in docs of luSolveAll and usolveAll 2021-03-09 21:13:06 +01:00
Jos de Jong
54570e571c Upgrade to karma@6.1.1 2021-02-14 11:31:08 +01:00
Jos de Jong
23ce12a8cb Update devDependencies 2021-02-14 11:25:49 +01:00
Jos de Jong
67a9878073 Revert "Configure default timeout for mocha tests as 10 seconds"
This reverts commit f812e662
2021-02-03 19:01:15 +01:00