Skip to content

Commit e9b5947

Browse files
authored
Merge branch 'develop' into broadcasting-without-cloning
2 parents be6b091 + 4d08f7f commit e9b5947

File tree

25 files changed

+227
-84
lines changed

25 files changed

+227
-84
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.

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
math.js
22
https://github.com/josdejong/mathjs
33

4-
Copyright (C) 2013-2025 Jos de Jong <wjosdejong@gmail.com>
4+
Copyright (C) 2013-2026 Jos de Jong <wjosdejong@gmail.com>
55

66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Math.js is an extensive math library for JavaScript and Node.js. It features a f
77
[![Version](https://img.shields.io/npm/v/mathjs.svg)](https://www.npmjs.com/package/mathjs)
88
[![Downloads](https://img.shields.io/npm/dm/mathjs.svg)](https://www.npmjs.com/package/mathjs)
99
[![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/2025.svg)](https://github.com/josdejong/mathjs/graphs/commit-activity)
10+
[![Maintenance](https://img.shields.io/maintenance/yes/2026.svg)](https://github.com/josdejong/mathjs/graphs/commit-activity)
1111
[![License](https://img.shields.io/github/license/josdejong/mathjs.svg)](https://github.com/josdejong/mathjs/blob/master/LICENSE)
1212
[![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)
1313
[![Codecov](https://codecov.io/gh/josdejong/mathjs/branch/develop/graph/badge.svg)](https://codecov.io/gh/josdejong/mathjs)
@@ -191,18 +191,18 @@ 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

202202
mathjs is published under the Apache 2.0 license:
203203

204204
```
205-
Copyright (C) 2013-2025 Jos de Jong <wjosdejong@gmail.com>
205+
Copyright (C) 2013-2026 Jos de Jong <wjosdejong@gmail.com>
206206
207207
Licensed under the Apache License, Version 2.0 (the "License");
208208
you may not use this file except in compliance with the License.

bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* cat script.txt | mathjs > results.txt Run input stream, output to file
3131
*
3232
* @license
33-
* Copyright (C) 2013-2025 Jos de Jong <wjosdejong@gmail.com>
33+
* Copyright (C) 2013-2026 Jos de Jong <wjosdejong@gmail.com>
3434
*
3535
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
3636
* use this file except in compliance with the License. You may obtain a copy

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
@@ -45,14 +45,21 @@ export const createAdd = /* #__PURE__ */ factory(
4545
*
4646
* const c = math.unit('5 cm')
4747
* const d = math.unit('2.1 mm')
48-
* math.add(c, d) // returns Unit 52.1 mm
48+
* math.add(c, d) // returns Unit 5.21 cm
4949
*
5050
* math.add("2.3", "4") // returns number 6.3
5151
*
5252
* See also:
5353
*
5454
* subtract, sum
5555
*
56+
* History:
57+
*
58+
* v13 Handle bigint arguments
59+
* v11.6 Support matrix broadcasting
60+
* v3.8 Allow more than two arguments
61+
* v0.0.2 Created
62+
*
5663
* @param {number | BigNumber | bigint | Fraction | Complex | Unit | Array | Matrix} x First value to add
5764
* @param {number | BigNumber | bigint | Fraction | Complex | Unit | Array | Matrix} y Second value to add
5865
* @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

0 commit comments

Comments
 (0)