Skip to content

Commit 0c08fd0

Browse files
authored
Merge branch 'develop' into jagged-arrays
2 parents 2130ba6 + 4d08f7f commit 0c08fd0

File tree

22 files changed

+222
-79
lines changed

22 files changed

+222
-79
lines changed

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,5 +282,7 @@ Richard Taylor <richard.taylor@claconnect.com>
282282
NilsDietrich <61544566+NilsDietrich@users.noreply.github.com>
283283
anslem chibuike <144047596+AnslemHack@users.noreply.github.com>
284284
Ayomide Bamigbade <iamtryve@gmail.com>
285+
Dheemanth07 <dheemanth1007@gmail.com>
286+
Anadian <willanad@yandex.com>
285287

286288
# Generated by tools/update-authors.js

HISTORY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
# unreleased changes since 15.1.0
44

5+
- Fix: #3631 Handle bigints in `compareNatural` (#3632). Thanks @Dheemanth07.
6+
- Docs: Correct several arithmetic and relational documentation examples
7+
and add History (#3630). Thanks @Anadian.
58
- Fix: #3578 interpret empty true-expr of conditional as error (#3581).
69
Thanks @gwhitney.
710
- Fix: #3597 added nullish type definitions (#3601). Thanks @Ayo1984.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ To see the coverage results, open the generated report in your browser:
191191

192192
### Continuous integration testing
193193

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.
194+
Continuous integration tests are run on [GitHub Actions](https://github.com/josdejong/mathjs/actions) and [TestMu AI](https://www.testmu.ai) (formerly LambdaTest) every time a commit is pushed to GitHub. GitHub Actions runs the tests for different versions of node.js, and TestMu AI runs the tests on all major browsers.
195195

196-
[![LambdaTest](https://raw.github.com/josdejong/mathjs/master/misc/lambdatest.svg)](https://www.lambdatest.com)
196+
[![TestMu AI](https://raw.github.com/josdejong/mathjs/develop/misc/testmu-ai.svg)](https://www.testmu.ai)
197197

198-
Thanks, GitHub Actions and LambdaTest for the generous free hosting of this open source project!
198+
Thanks, GitHub Actions and TestMu AI for the generous free hosting of this open source project!
199199

200200
## License
201201

misc/lambdatest.svg

Lines changed: 0 additions & 18 deletions
This file was deleted.

misc/testmu-ai.svg

Lines changed: 33 additions & 0 deletions
Loading

src/function/arithmetic/add.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,21 @@ export const createAdd = /* #__PURE__ */ factory(
4343
*
4444
* const c = math.unit('5 cm')
4545
* const d = math.unit('2.1 mm')
46-
* math.add(c, d) // returns Unit 52.1 mm
46+
* math.add(c, d) // returns Unit 5.21 cm
4747
*
4848
* math.add("2.3", "4") // returns number 6.3
4949
*
5050
* See also:
5151
*
5252
* subtract, sum
5353
*
54+
* History:
55+
*
56+
* v13 Handle bigint arguments
57+
* v11.6 Support matrix broadcasting
58+
* v3.8 Allow more than two arguments
59+
* v0.0.2 Created
60+
*
5461
* @param {number | BigNumber | bigint | Fraction | Complex | Unit | Array | Matrix} x First value to add
5562
* @param {number | BigNumber | bigint | Fraction | Complex | Unit | Array | Matrix} y Second value to add
5663
* @return {number | BigNumber | bigint | Fraction | Complex | Unit | Array | Matrix} Sum of `x` and `y`

src/function/arithmetic/cbrt.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,18 @@ export const createCbrt = /* #__PURE__ */ factory(name, dependencies, ({ config,
3636
* math.map([27, 64, 125], x => math.cbrt(x)) // returns [3, 4, 5]
3737
*
3838
* const x = math.complex('8i')
39-
* math.cbrt(x) // returns Complex 1.7320508075689 + i
40-
* math.cbrt(x, true) // returns Matrix [
41-
* // 1.7320508075689 + i
42-
* // -1.7320508075689 + i
43-
* // -2i
44-
* // ]
39+
* math.cbrt(x) // returns 1.7320508075689 + i ...
40+
* math.cbrt(x, true)
41+
* // Complex Matrix ["1.7320508075689+i", "-1.7320508075689+i", "-2i"]
4542
*
4643
* See also:
4744
*
4845
* square, sqrt, cube
4946
*
47+
* History:
48+
*
49+
* v2.3 Created
50+
*
5051
* @param {number | BigNumber | Complex | Unit} x
5152
* Value for which to calculate the cubic root.
5253
* @param {boolean} [allRoots] Optional, false by default. Only applicable

src/function/arithmetic/ceil.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ export const createCeil = /* #__PURE__ */ factory(name, dependencies, ({ typed,
8686
* math.ceil(-4.782, 2) // returns number -4.78
8787
*
8888
* const c = math.complex(3.24, -2.71)
89-
* math.ceil(c) // returns Complex 4 - 2i
89+
* math.ceil(c) // returns Complex 4 - 2i ...
9090
* math.ceil(c, 1) // returns Complex 3.3 - 2.7i
9191
*
9292
* const unit = math.unit('3.241 cm')
9393
* const cm = math.unit('cm')
9494
* const mm = math.unit('mm')
95-
* math.ceil(unit, 1, cm) // returns Unit 3.3 cm
95+
* math.ceil(unit, 1, cm) // returns Unit 3.3 cm ...
9696
* math.ceil(unit, 1, mm) // returns Unit 32.5 mm
9797
*
9898
* math.ceil([3.2, 3.8, -4.7]) // returns Array [4, 4, -4]
@@ -102,6 +102,14 @@ export const createCeil = /* #__PURE__ */ factory(name, dependencies, ({ typed,
102102
*
103103
* floor, fix, round
104104
*
105+
* History:
106+
*
107+
* v14 Handle Units
108+
* v7.4 Allow second "precision" argument
109+
* v5.7 Support tolerance for round-off errors
110+
* v2 Handle Fractions
111+
* v0.1 Created
112+
*
105113
* @param {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} x Value to be rounded
106114
* @param {number | BigNumber | Array} [n=0] Number of decimals
107115
* @param {Unit} [valuelessUnit] A valueless unit

src/function/arithmetic/exp.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,18 @@ export const createExp = /* #__PURE__ */ factory(name, dependencies, ({ typed })
2222
* math.log(math.exp(2)) // returns number 2
2323
*
2424
* math.map([1, 2, 3], math.exp)
25-
* // returns Array [
26-
* // 2.718281828459045,
27-
* // 7.3890560989306495,
28-
* // 20.085536923187668
29-
* // ]
25+
* // returns [2.718281828459045, 7.3890560989306495, 20.085536923187668]
3026
*
3127
* See also:
3228
*
3329
* expm1, expm, log, pow
3430
*
31+
* History:
32+
*
33+
* v11 Don't apply elementwise, avoid confusion with matrix exponential
34+
* v0.20 Handle BigNumbers
35+
* v0.0.2 Created
36+
*
3537
* @param {number | BigNumber | Complex} x A number to exponentiate
3638
* @return {number | BigNumber | Complex} Exponential of `x`
3739
*/

src/function/arithmetic/expm1.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ export const createExpm1 = /* #__PURE__ */ factory(name, dependencies, ({ typed,
2525
* math.log(math.expm1(2) + 1) // returns number 2
2626
*
2727
* math.map([1, 2, 3], math.expm1)
28-
* // returns Array [
29-
* // 1.718281828459045,
30-
* // 6.3890560989306495,
31-
* // 19.085536923187668
32-
* // ]
28+
* // returns [1.718281828459045, 6.3890560989306495, 19.085536923187668]
3329
*
3430
* See also:
3531
*
3632
* exp, expm, log, pow
3733
*
34+
* History:
35+
*
36+
* v11 Don't apply elementwise, avoids confusion with matrix exponential
37+
* v4.2 Created
38+
*
3839
* @param {number | BigNumber | Complex} x The number to exponentiate
3940
* @return {number | BigNumber | Complex} Exponential of `x`, minus one
4041
*/

0 commit comments

Comments
 (0)