mathjs 14.0.1 → 14.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. package/HISTORY.md +9 -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/arithmetic/log.js +12 -5
  17. package/lib/cjs/function/arithmetic/log10.js +15 -7
  18. package/lib/cjs/function/arithmetic/log2.js +9 -4
  19. package/lib/cjs/function/probability/randomInt.js +26 -3
  20. package/lib/cjs/function/relational/larger.js +12 -4
  21. package/lib/cjs/function/relational/smaller.js +12 -4
  22. package/lib/cjs/function/statistics/max.js +1 -1
  23. package/lib/cjs/function/statistics/min.js +1 -1
  24. package/lib/cjs/function/string/print.js +2 -2
  25. package/lib/cjs/function/utils/isInteger.js +1 -1
  26. package/lib/cjs/header.js +3 -3
  27. package/lib/cjs/utils/bigint.js +33 -0
  28. package/lib/cjs/utils/number.js +7 -19
  29. package/lib/cjs/version.js +1 -1
  30. package/lib/esm/entry/dependenciesAny/dependenciesLarger.generated.js +2 -0
  31. package/lib/esm/entry/dependenciesAny/dependenciesRandomInt.generated.js +2 -0
  32. package/lib/esm/entry/dependenciesAny/dependenciesSmaller.generated.js +2 -0
  33. package/lib/esm/entry/dependenciesNumber/dependenciesRandomInt.generated.js +2 -0
  34. package/lib/esm/entry/impureFunctionsNumber.generated.js +2 -2
  35. package/lib/esm/entry/pureFunctionsAny.generated.js +3 -0
  36. package/lib/esm/entry/pureFunctionsNumber.generated.js +6 -5
  37. package/lib/esm/expression/embeddedDocs/function/arithmetic/sign.js +1 -1
  38. package/lib/esm/function/arithmetic/log.js +12 -5
  39. package/lib/esm/function/arithmetic/log10.js +16 -8
  40. package/lib/esm/function/arithmetic/log2.js +9 -4
  41. package/lib/esm/function/probability/randomInt.js +26 -3
  42. package/lib/esm/function/relational/larger.js +12 -4
  43. package/lib/esm/function/relational/smaller.js +12 -4
  44. package/lib/esm/function/statistics/max.js +1 -1
  45. package/lib/esm/function/statistics/min.js +1 -1
  46. package/lib/esm/function/string/print.js +2 -2
  47. package/lib/esm/function/utils/isInteger.js +1 -1
  48. package/lib/esm/header.js +1 -1
  49. package/lib/esm/utils/bigint.js +27 -0
  50. package/lib/esm/utils/number.js +6 -17
  51. package/lib/esm/version.js +1 -1
  52. package/package.json +13 -11
package/HISTORY.md CHANGED
@@ -1,5 +1,14 @@
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
+
3
12
  # 2024-12-11, 14.0.1
4
13
 
5
14
  - Fix: make derivative much faster (#3322). Thanks @paulftw.
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