4968 Commits

Author SHA1 Message Date
Jos de Jong
fd5a6f7f17 chore: update history, reorder comment 2023-09-20 09:53:11 +02:00
David Contreras
dcf12c4cec
Quantile-refactor (#3003)
* Included math to syntax when missing

* Included solveODE

* renamed initialStep as firstStep

* Included tests for solveODE

* Test the full state instead of the final state

* Fixed issue with tolerance

* Added unit signature for y0

* Included units test also for y0

* Included embedded docs and more tests

* Included error for tspan

* It works with bignumbers

* reduced calling bignumber

* extended the search for bignumbers

* The jsdocs is less ambiguous

* included tests for step options

* Allowed for 0 minStep

* Optimization to avoid checking the sign every step

* refactor

* Typo

* removed unnecesary error

* Fixes conflict with develop

* Merge logic on _quantileSeqProbNumber

* Reduced _quantileSeqProbCollection

* Merged logic of _quantileSeq

* Fixed issue with transform and browser

---------

Co-authored-by: David Contreras <david.contreras@guentner.com>
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-09-20 09:48:37 +02:00
Jos de Jong
0e9c73764b chore: move plain number tests from node-tests to unit-tests, remove redundant tests (see #3011) 2023-09-20 09:35:12 +02:00
Jos de Jong
012700117e Merge remote-tracking branch 'origin/develop' into develop 2023-09-20 09:24:54 +02:00
Praise Nnamonu
1465ac7bbb
Fix round-off errors in mod() (#3011)
* changes made to the following files:

- mod.js

- gcd.js

* updated BigNumber implementation and added validating tests

* added validating test cases

* updated test cases

* formatted code

* Made updates according to requirement

used mathjs floor in mod.js

imported mod in gcd.js

made mod work for negative divisors

wrote and updated tests to validate new behavior

* updated mod in arithmetic.js

* added tests for modNumber function

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-09-20 09:24:17 +02:00
Jos de Jong
97e743290b chore: describe all parameters of approx.deepEqual 2023-09-20 08:50:25 +02:00
David Contreras
c35a8019ee
Print one based in the parser (#3009)
* broadcasting

* Simplified broadcasting

* Updated for broadcasting

* Changed to camel case

* Camel case and auto formating

* Added comments

* Skip if matrices have the same size

* Fixed issue with undefined variable

missing dot  in `A._size`

* Implemented broadcasting in all functions

* Added helper functions

* Added function to check for broadcasting rules

* Tests for broadcasted arithmetic

* Fixed issue with matrix the size of a vector

* Documented and updated broadcasting

* Included broadcast.test

* Included math to syntax when missing

* Added print transform and tests

* Simplify conditional

* Included regex in an util

---------

Co-authored-by: David Contreras <david.contreras@guentner.com>
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-09-06 11:21:59 +02:00
Jos de Jong
08bf93ba2a chore: publish v11.11.0 v11.11.0 2023-09-05 09:39:44 +02:00
Jos de Jong
6926590f20 fix #3024: lock fraction.js at version 4.3.4 for now, 4.3.6 gives issues in some setups 2023-09-05 09:34:51 +02:00
Jos de Jong
a8cc5f9ae5 docs: update links to https://github.com/rawify/Fraction.js 2023-09-04 15:48:35 +02:00
Jos de Jong
77203ac798 docs: update HISTORY.md 2023-09-01 13:40:33 +02:00
Vrushaket Chaudhari
1ee8733832
added correlation function to statistics (#3015)
* added correlation function to statistics

* added implemenation for signature Matrix, Matrix and support for BigNumbers

* reverted changes to default for version numbers of devDepenencies

* reverted changes to default for version numbers of devDepenencies in package-lock.json

* change variable name from xArray, yArray to x and y

* added Matrix as param in index.d.ts

* corrected the file and function names for correlation function

* renamed createCorrelation to createCorr in factoriesNumber.js

* fixed failing test case for matrix and added params and return in corr
2023-09-01 13:38:49 +02:00
Jos de Jong
2a3c99de7a fix: upgrade to fraction.js@4.3.4 v11.10.1 2023-08-31 10:43:39 +02:00
Jos de Jong
c5644f4b0a chore: publish v11.10.1 2023-08-31 09:28:14 +02:00
Jos de Jong
69e0872871 fix: temporarily lock fraction.js@4.2.0, see #3022 2023-08-31 09:24:39 +02:00
Jos de Jong
e7282640aa docs: update HISTORY.md 2023-08-30 11:52:24 +02:00
Jos de Jong
983756ab80 Merge remote-tracking branch 'origin/develop' into develop 2023-08-30 11:46:15 +02:00
David Contreras
856b9489fa
Example for Lorenz attractor (#3018)
* broadcasting

* Simplified broadcasting

* Updated for broadcasting

* Changed to camel case

* Camel case and auto formating

* Added comments

* Skip if matrices have the same size

* Fixed issue with undefined variable

missing dot  in `A._size`

* Implemented broadcasting in all functions

* Added helper functions

* Added function to check for broadcasting rules

* Tests for broadcasted arithmetic

* Fixed issue with matrix the size of a vector

* Documented and updated broadcasting

* Included broadcast.test

* Included math to syntax when missing

* Lorenz attractor

---------

Co-authored-by: David Contreras <david.contreras@guentner.com>
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-08-30 11:46:04 +02:00
Jos de Jong
2c819ea9f0 Merge remote-tracking branch 'origin/develop' into develop 2023-08-30 11:27:33 +02:00
Jos de Jong
386c280280 docs: define see also sections for erf and zeta 2023-08-30 11:25:48 +02:00
Carl Osterwisch
49a19cad3b
Energy prefixes (#3019)
* Enable short and long prefixes for the erg unit of energy

* Use long prefixes instead of short for the joule unit of energy

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-08-30 11:04:38 +02:00
Jos de Jong
7e35dad058 fix linting issues 2023-08-30 10:57:39 +02:00
Jos de Jong
df4ac5abf3 fix #3020: lruQueue using the global hasOwnProperty which may be polluted 2023-08-30 10:50:03 +02:00
Jos de Jong
c4926ce56f chore: publish v11.10.0 v11.10.0 2023-08-23 15:56:47 +02:00
Jos de Jong
a21d46ead1 Merge remote-tracking branch 'origin/develop' into develop 2023-08-23 15:50:45 +02:00
Jos de Jong
e36f90e1a8
Implement function Riemann Zeta (#2975, #2950)
* Riemann Zeta Function

* Big Number zeta and added docs

* Original algorithm paper credited

* Update index.d.ts

* Update riemannZeta.js

* Update index.d.ts

* Renamed files to reflect zeta

* chore: make all the tests pass

* chore: refactor `zeta` (WIP)

* chore: reuse the validation logic of both number and BigNumber

* fix: type definitions of `zeta`

* fix: test the accuracy with numbers and BigNumbers (WIP)

* chore: make linter happy

* docs: fix example outputs

* docs: update history

* docs: update history

* docs: describe the limited precision of `zeta`

---------

Co-authored-by: BuildTools <anikpatel1322@gmail.com>
Co-authored-by: Anik Patel <74193405+Bobingstern@users.noreply.github.com>
2023-08-23 15:50:11 +02:00
Jos de Jong
44c771ab55 docs: update history 2023-08-23 12:39:12 +02:00
Jos de Jong
df61fdbcd3 Merge remote-tracking branch 'origin/develop' into develop 2023-08-23 12:37:04 +02:00
David Contreras
3ab9bc1ea3
Extend quantileSeq with support for a dimension (#3002)
* Included math to syntax when missing

* Included solveODE

* renamed initialStep as firstStep

* Included tests for solveODE

* Test the full state instead of the final state

* Fixed issue with tolerance

* Added unit signature for y0

* Included units test also for y0

* Included embedded docs and more tests

* Included error for tspan

* It works with bignumbers

* reduced calling bignumber

* extended the search for bignumbers

* The jsdocs is less ambiguous

* included tests for step options

* Allowed for 0 minStep

* Optimization to avoid checking the sign every step

* added dim to quantile

* Included transform

* Removed modification of the docs

I made an unwanted modification

---------

Co-authored-by: David Contreras <david.contreras@guentner.com>
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-08-23 12:36:54 +02:00
Jos de Jong
1b99535785 docs: update history 2023-07-28 09:33:09 +02:00
David Contreras
49c793ba5a
feat: Indexing with an array of booleans (#2994)
* Included math to syntax when missing

* Included solveODE

* renamed initialStep as firstStep

* Included tests for solveODE

* Test the full state instead of the final state

* Fixed issue with tolerance

* Indexing with an array of booleans

* Indexing with booleans and with empty

* Changed index embedded docs

* removed solveODE

* typos on tests

* included config.predictable

* Throws an error if the size doesn't match

* Included config predictable to get subset

* Can do replacement by broadcasting

* DenseMatrix set can broadcast first

* Added tests for broadcasted subset in the parser

* Faster cloning of deep arrays

* Included docs and better test coverage

* Test coverage for `subset`

* Removed config predictable from subset

* Removed config from index and sparseMatrix

* Redaction and typos

* Cleanup unnecesary changes

* fixed issue when there is no need to broadcast

* Inline ifs

* Included specific broadcasting test

* Reduced repetition

---------

Co-authored-by: David Contreras <david.contreras@guentner.com>
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-07-28 09:30:04 +02:00
Jos de Jong
202c07e021 docs: update history 2023-07-27 12:15:09 +02:00
Jos de Jong
a30d1f8ce6
fix: #2990 DenseMatrix can mutate input arrays (#2991)
* fix: #2990 DenseMatrix can mutate input arrays

* chore: simplify internal function `preprocess`

* chore: document ugly workaround of using `matrix.subset` to mutate a nested Array

* chore: better solution for `assign`

* chore: fix linting issue

* chore: add a unit test for `multiply` testing whether the operation is immutable

* chore: fix linting issue

---------

Co-authored-by: Glen Whitney <glen@studioinfinity.org>
2023-07-27 11:42:36 +02:00
Jos de Jong
563ff63ec0 chore: publish v11.9.1 v11.9.1 2023-07-24 12:37:21 +02:00
Jos de Jong
6dcbc6b793 fix: security vulnerability in FunctionNode and SymbolNode allowing arbitrary code execution via math.evaluate 2023-07-24 12:33:28 +02:00
Jos de Jong
d0d11a2f01 fix #3001: mathjs bundle containing new Function(...) (CSP issue) 2023-07-20 12:45:00 +02:00
Jos de Jong
5477d3829f chore: update devDependencies 2023-07-19 15:15:22 +02:00
Jos de Jong
7f6b4f9ca6 chore: publish v11.9.0 v11.9.0 2023-07-19 14:09:22 +02:00
Jos de Jong
b2a606b03a Merge remote-tracking branch 'origin/develop' into develop 2023-07-19 14:05:09 +02:00
Jos de Jong
8855ba522b docs: update HISTORY.md 2023-07-19 11:57:22 +02:00
David Contreras
8fe5e517d6
feat: support units in range (#2997)
* reange refactoring

* update authors

* Made _range to work also for _bigNumbers

* Range with units

* Included some Unit type in _range

* Included TypeScript types for function range

* Formatting

---------

Co-authored-by: David Contreras <david.contreras@guentner.com>
2023-07-19 11:55:53 +02:00
Jos de Jong
14614f2183 chore: update history and authors 2023-07-13 17:27:58 +02:00
Aly Khaled
8475ab997b
zpk2tf and freqz functions implementation (#2988)
* Add Zpk2tf function

* Add zpk2tf function documentation

* Fix

* Add freqz function implementation

* Fix format

* Add freqz function documentation

* Fix

* Fix format

* Update index.d.ts

* Fix Dependency error

* Fix

* Fix index.d.ts

* Fix Documentation

* Fix Lint

* Fix index.d.ts

* Fix The Matrix parameter support and index.d.ts

* Fix Format

* Add Unit Tests for Matrix cases

* Fix Docs and Lint

* Add tests for coverage

* Fix Format

* Update AUTHORS

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-07-13 17:23:50 +02:00
David Contreras
7923d58e2e
Range refactoring (#2995)
* reange refactoring

* update authors

* Made _range to work also for _bigNumbers

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-07-13 17:02:18 +02:00
Jos de Jong
ab409dffeb chore: ignore freqz in the doc test for the time being (see #2988) 2023-07-13 16:48:04 +02:00
Jos de Jong
6169f0a8a5 docs: update HISTORY.md 2023-07-12 15:03:31 +02:00
David Contreras
1aed900cc0
feat: implement solveODE (#2958)
* Included math to syntax when missing

* Included solveODE

* renamed initialStep as firstStep

* Included tests for solveODE

* Test the full state instead of the final state

* Fixed issue with tolerance

* Added unit signature for y0

* Included units test also for y0

* Included embedded docs and more tests

* Included error for tspan

* It works with bignumbers

* reduced calling bignumber

* extended the search for bignumbers

* The jsdocs is less ambiguous

* included tests for step options

* Allowed for 0 minStep

* Optimization to avoid checking the sign every step

---------

Co-authored-by: David Contreras <david.contreras@guentner.com>
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-07-12 14:28:10 +02:00
Jos de Jong
f48caf9f50 docs: don't check expected result of an example when we don't know the expected result 2023-07-12 14:15:57 +02:00
Jos de Jong
f0b87e435e chore: update HISTORY.md 2023-07-12 13:23:54 +02:00
Carl Osterwisch
a1e6e9301e
fix: nearly-zero temperature conversion result (#2962)
* Test for roundoff error due to offset

* Set result to exactly 0 if it is within config.epsilon of 0

* Add more offset conversion tests

* Represent degR unit value as a Fraction(5, 9)

* Accurately convert from fraction to bignumber

* Add more tests demonstrating the improved offset conversions

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-07-12 13:21:56 +02:00