mathjs 14.0.0 → 14.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/HISTORY.md +15 -0
  2. package/NOTICE +1 -1
  3. package/README.md +7 -7
  4. package/bin/cli.js +1 -1
  5. package/lib/browser/math.js +1 -1
  6. package/lib/browser/math.js.LICENSE.txt +5 -5
  7. package/lib/browser/math.js.map +1 -1
  8. package/lib/cjs/entry/dependenciesAny/dependenciesLarger.generated.js +2 -0
  9. package/lib/cjs/entry/dependenciesAny/dependenciesRandomInt.generated.js +2 -0
  10. package/lib/cjs/entry/dependenciesAny/dependenciesSmaller.generated.js +2 -0
  11. package/lib/cjs/entry/dependenciesNumber/dependenciesRandomInt.generated.js +2 -0
  12. package/lib/cjs/entry/impureFunctionsNumber.generated.js +1 -1
  13. package/lib/cjs/entry/pureFunctionsAny.generated.js +3 -0
  14. package/lib/cjs/entry/pureFunctionsNumber.generated.js +5 -4
  15. package/lib/cjs/expression/embeddedDocs/function/arithmetic/sign.js +1 -1
  16. package/lib/cjs/function/algebra/derivative.js +64 -77
  17. package/lib/cjs/function/arithmetic/log.js +12 -5
  18. package/lib/cjs/function/arithmetic/log10.js +15 -7
  19. package/lib/cjs/function/arithmetic/log2.js +9 -4
  20. package/lib/cjs/function/probability/randomInt.js +26 -3
  21. package/lib/cjs/function/relational/larger.js +12 -4
  22. package/lib/cjs/function/relational/smaller.js +12 -4
  23. package/lib/cjs/function/statistics/max.js +1 -1
  24. package/lib/cjs/function/statistics/min.js +1 -1
  25. package/lib/cjs/function/string/print.js +2 -2
  26. package/lib/cjs/function/utils/isInteger.js +1 -1
  27. package/lib/cjs/header.js +3 -3
  28. package/lib/cjs/utils/bigint.js +33 -0
  29. package/lib/cjs/utils/number.js +7 -19
  30. package/lib/cjs/version.js +1 -1
  31. package/lib/esm/entry/dependenciesAny/dependenciesLarger.generated.js +2 -0
  32. package/lib/esm/entry/dependenciesAny/dependenciesRandomInt.generated.js +2 -0
  33. package/lib/esm/entry/dependenciesAny/dependenciesSmaller.generated.js +2 -0
  34. package/lib/esm/entry/dependenciesNumber/dependenciesRandomInt.generated.js +2 -0
  35. package/lib/esm/entry/impureFunctionsNumber.generated.js +2 -2
  36. package/lib/esm/entry/pureFunctionsAny.generated.js +3 -0
  37. package/lib/esm/entry/pureFunctionsNumber.generated.js +6 -5
  38. package/lib/esm/expression/embeddedDocs/function/arithmetic/sign.js +1 -1
  39. package/lib/esm/function/algebra/derivative.js +64 -77
  40. package/lib/esm/function/arithmetic/log.js +12 -5
  41. package/lib/esm/function/arithmetic/log10.js +16 -8
  42. package/lib/esm/function/arithmetic/log2.js +9 -4
  43. package/lib/esm/function/probability/randomInt.js +26 -3
  44. package/lib/esm/function/relational/larger.js +12 -4
  45. package/lib/esm/function/relational/smaller.js +12 -4
  46. package/lib/esm/function/statistics/max.js +1 -1
  47. package/lib/esm/function/statistics/min.js +1 -1
  48. package/lib/esm/function/string/print.js +2 -2
  49. package/lib/esm/function/utils/isInteger.js +1 -1
  50. package/lib/esm/header.js +1 -1
  51. package/lib/esm/utils/bigint.js +27 -0
  52. package/lib/esm/utils/number.js +6 -17
  53. package/lib/esm/version.js +1 -1
  54. package/package.json +19 -17
  55. package/types/index.d.ts +5 -8
package/HISTORY.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # History
2
2
 
3
+ # 2025-01-24, 14.1.0
4
+
5
+ - Feat: implement `bigint` support in functions `log`, `log2`, `log10`,
6
+ `larger`, `smaller`, `max`, `min` (#3345). Thanks @gwhitney.
7
+ - Fix: #3342 hexadecimal input not turned into a `bigint` (#3348).
8
+ - Fix `randomInt()` not working (#3345).
9
+ - Docs: fixed description of `sign` in the embedded docs (#3338).
10
+ Thanks @witer33.
11
+
12
+ # 2024-12-11, 14.0.1
13
+
14
+ - Fix: make derivative much faster (#3322). Thanks @paulftw.
15
+ - Fix: #3317 export `Fraction` type from the `fraction.js` library instead of
16
+ using a custom interface (#3330). Thanks @fchu.
17
+
3
18
  # 2024-11-20, 14.0.0
4
19
 
5
20
  !!! BE CAREFUL: BREAKING CHANGES !!!
package/NOTICE CHANGED
@@ -1,7 +1,7 @@
1
1
  math.js
2
2
  https://github.com/josdejong/mathjs
3
3
 
4
- Copyright (C) 2013-2024 Jos de Jong <wjosdejong@gmail.com>
4
+ Copyright (C) 2013-2025 Jos de Jong <wjosdejong@gmail.com>
5
5
 
6
6
  Licensed under the Apache License, Version 2.0 (the "License");
7
7
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -7,7 +7,7 @@ Math.js is an extensive math library for JavaScript and Node.js. It features a f
7
7
  [![Version](https://img.shields.io/npm/v/mathjs.svg)](https://www.npmjs.com/package/mathjs)
8
8
  [![Downloads](https://img.shields.io/npm/dm/mathjs.svg)](https://www.npmjs.com/package/mathjs)
9
9
  [![Build Status](https://github.com/josdejong/mathjs/workflows/Node.js%20CI/badge.svg)](https://github.com/josdejong/mathjs/actions)
10
- [![Maintenance](https://img.shields.io/maintenance/yes/2024.svg)](https://github.com/josdejong/mathjs/graphs/commit-activity)
10
+ [![Maintenance](https://img.shields.io/maintenance/yes/2025.svg)](https://github.com/josdejong/mathjs/graphs/commit-activity)
11
11
  [![License](https://img.shields.io/github/license/josdejong/mathjs.svg)](https://github.com/josdejong/mathjs/blob/master/LICENSE)
12
12
  [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjosdejong%2Fmathjs.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjosdejong%2Fmathjs?ref=badge_shield)
13
13
  [![Codecov](https://codecov.io/gh/josdejong/mathjs/branch/develop/graph/badge.svg)](https://codecov.io/gh/josdejong/mathjs)
@@ -168,9 +168,9 @@ Additionally, the tests can be run on FireFox using [headless mode](https://deve
168
168
 
169
169
  npm run test:browser
170
170
 
171
- To run the tests remotely on BrowserStack, first set the environment variables `BROWSER_STACK_USERNAME` and `BROWSER_STACK_ACCESS_KEY` with your username and access key and then execute:
171
+ To run the tests remotely on LambdaTest, first set the environment variables `LT_USERNAME` and `LT_ACCESS_KEY` with your username and access key and then execute:
172
172
 
173
- npm run test:browserstack
173
+ npm run test:lambdatest
174
174
 
175
175
  You can separately run the code linter, though it is also executed with `npm test`:
176
176
 
@@ -191,18 +191,18 @@ To see the coverage results, open the generated report in your browser:
191
191
 
192
192
  ### Continuous integration testing
193
193
 
194
- Continuous integration tests are run on [Github Actions](https://github.com/josdejong/mathjs/actions) and [BrowserStack](https://www.browserstack.com) every time a commit is pushed to github. Github Actions runs the tests for different versions of node.js, and BrowserStack runs the tests on all major browsers.
194
+ Continuous integration tests are run on [Github Actions](https://github.com/josdejong/mathjs/actions) and [LambdaTest](https://www.lambdatest.com) every time a commit is pushed to github. Github Actions runs the tests for different versions of node.js, and LambdaTest runs the tests on all major browsers.
195
195
 
196
- [![BrowserStack](https://raw.github.com/josdejong/mathjs/master/misc/browserstack.png)](https://www.browserstack.com)
196
+ [![LambdaTest](https://raw.github.com/josdejong/mathjs/master/misc/lambdatest.svg)](https://www.lambdatest.com)
197
197
 
198
- Thanks Github Actions and BrowserStack for the generous free hosting of this open source project!
198
+ Thanks, GitHub Actions and LambdaTest for the generous free hosting of this open source project!
199
199
 
200
200
  ## License
201
201
 
202
202
  mathjs is published under the Apache 2.0 license:
203
203
 
204
204
  ```
205
- Copyright (C) 2013-2024 Jos de Jong <wjosdejong@gmail.com>
205
+ Copyright (C) 2013-2025 Jos de Jong <wjosdejong@gmail.com>
206
206
 
207
207
  Licensed under the Apache License, Version 2.0 (the "License");
208
208
  you may not use this file except in compliance with the License.
package/bin/cli.js CHANGED
@@ -30,7 +30,7 @@
30
30
  * cat script.txt | mathjs > results.txt Run input stream, output to file
31
31
  *
32
32
  * @license
33
- * Copyright (C) 2013-2024 Jos de Jong <wjosdejong@gmail.com>
33
+ * Copyright (C) 2013-2025 Jos de Jong <wjosdejong@gmail.com>
34
34
  *
35
35
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
36
36
  * use this file except in compliance with the License. You may obtain a copy