chore: publish v14.5.0

This commit is contained in:
Jos de Jong 2025-05-21 15:32:28 +02:00
parent c0ec099f95
commit 6565fef586
36 changed files with 84 additions and 52 deletions

View File

@ -16,6 +16,7 @@ const config = {
absTol: 1e-15,
matrix: 'Matrix',
number: 'number',
numberFallback: 'number',
precision: 64,
predictable: false,
randomSeed: null

View File

@ -4,7 +4,7 @@ layout: default
<h1 id="expression-syntax">Expression syntax <a href="#expression-syntax" title="Permalink">#</a></h1>
This page describes the syntax of expression parser of math.js. It describes
This page describes the syntax of the expression parser of math.js. It describes
how to work with the available data types, functions, operators, variables,
and more.
@ -253,6 +253,26 @@ Note that math.js embodies a preference for the operator forms, in that calling
`simplify` (see [Algebra](./algebra.html)) converts any instances of the function
form into the corresponding operator.
<h2 id="methods">Methods <a href="#methods" title="Permalink">#</a></h2>
Some data types have methods which can be used in the parser using the dot notation, for example:
```js
const parser = math.parser()
parser.evaluate('a = 1 m') // Unit 1 m
parser.evaluate('a.toNumber("mm")') // 1000
```
Or a method on a Matrix or Array:
```js
const parser = math.parser()
parser.evaluate('M = [4, 9, 25]') // Matrix [4, 9, 25]
parser.evaluate('M.map(sqrt)') // Matrix [2, 3, 5]
```
<h2 id="map-and-foreach">Map and forEach <a href="#map-and-foreach" title="Permalink">#</a></h2>
The `map` and `forEach` functions can be used to apply a callback function to each element of an array or matrix.

View File

@ -11,7 +11,7 @@ Function | Description
[math.compile(expr)](functions/compile.html) | Parse and compile an expression.
[math.evaluate(expr&nbsp;[,&nbsp;scope])](functions/evaluate.html) | Evaluate an expression.
[math.help(search)](functions/help.html) | Retrieve help on a function or data type.
[math.parser()](functions/parser.html) | Create a parser.
[math.parser()](functions/parser.html) | Create a `math.
<h2 id="algebra-functions">Algebra functions <a href="#algebra-functions" title="Permalink">#</a></h2>

View File

@ -6,7 +6,7 @@ layout: default
<h1 id="function-parser">Function parser <a href="#function-parser" title="Permalink">#</a></h1>
Create a parser. The function creates a new `math.Parser` object.
Create a `math.Parser` object that keeps a context of variables and their values, allowing the evaluation of expressions in that context.
<h2 id="syntax">Syntax <a href="#syntax" title="Permalink">#</a></h2>

View File

@ -27,7 +27,7 @@ Math.js can be downloaded or linked from various content delivery networks:
<tbody>
<tr>
<td>unpkg</td>
<td><a href="https://unpkg.com/mathjs@14.4.0/">https://unpkg.com/mathjs@14.4.0/</a></td>
<td><a href="https://unpkg.com/mathjs@14.5.0/">https://unpkg.com/mathjs@14.5.0/</a></td>
</tr>
<tr>
<td>cdnjs</td>
@ -48,9 +48,9 @@ Or download the full bundle directly from [unpkg](https://unpkg.com):
<p>
<a
href="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"
>math.js (version 14.4.0, <span id="size">186 kB</span>, minified and gzipped)</a>
and if needed the <a href="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js.map">source map</a>
href="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"
>math.js (version 14.5.0, <span id="size">186 kB</span>, minified and gzipped)</a>
and if needed the <a href="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js.map">source map</a>
</p>
Too large for you? Create your own [custom bundle](docs/custom_bundling.html).

View File

@ -15,7 +15,7 @@
}
</style>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
</head>
<body>

View File

@ -24,7 +24,7 @@ File: [angle_configuration.html](angle_configuration.html) (click for a live dem
}
</style>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
</head>
<body>

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>math.js | basic usage</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
</head>
<body>

View File

@ -12,7 +12,7 @@ File: [basic_usage.html](basic_usage.html) (click for a live demo)
<head>
<meta charset="utf-8">
<title>math.js | basic usage</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
</head>
<body>

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>math.js | currency conversion</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<style>
body,

View File

@ -13,7 +13,7 @@ File: [currency_conversion.html](currency_conversion.html) (click for a live dem
<meta charset="utf-8">
<title>math.js | currency conversion</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<style>
body,

View File

@ -15,7 +15,7 @@
}
</style>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
</head>
<body>

View File

@ -24,7 +24,7 @@ File: [custom_separators.html](custom_separators.html) (click for a live demo)
}
</style>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
</head>
<body>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
<title>math.js | Lorenz Attractor</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<script src="https://cdn.plot.ly/plotly-2.25.2.min.js" charset="utf-8"></script>
<style>

View File

@ -13,7 +13,7 @@ File: [lorenz.html](lorenz.html) (click for a live demo)
<head>
<meta charset="UTF-8">
<title>math.js | Lorenz Attractor</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<script src="https://cdn.plot.ly/plotly-2.25.2.min.js" charset="utf-8"></script>
<style>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
<title>math.js | Lorenz Attractor</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<script src="https://cdn.plot.ly/plotly-2.28.0.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.js"

View File

@ -13,7 +13,7 @@ File: [lorenz_interactive.html](lorenz_interactive.html) (click for a live demo)
<head>
<meta charset="UTF-8">
<title>math.js | Lorenz Attractor</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<script src="https://cdn.plot.ly/plotly-2.28.0.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.js"

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>math.js | plot</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<script src="https://cdn.plot.ly/plotly-1.35.2.min.js"></script>

View File

@ -12,7 +12,7 @@ File: [plot.html](plot.html) (click for a live demo)
<head>
<meta charset="utf-8">
<title>math.js | plot</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<script src="https://cdn.plot.ly/plotly-1.35.2.min.js"></script>

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>math.js | pretty printing with MathJax</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
<style>

View File

@ -13,7 +13,7 @@ File: [pretty_printing_with_mathjax.html](pretty_printing_with_mathjax.html) (cl
<meta charset="utf-8">
<title>math.js | pretty printing with MathJax</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
<style>

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>math.js | printing HTML</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<style>
body {

View File

@ -13,7 +13,7 @@ File: [printing_html.html](printing_html.html) (click for a live demo)
<meta charset="utf-8">
<title>math.js | printing HTML</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<style>
body {

View File

@ -9,7 +9,7 @@
<script>
// load math.js using require.js
require(['https://unpkg.com/mathjs@14.4.0/lib/browser/math.js'], function (math) {
require(['https://unpkg.com/mathjs@14.5.0/lib/browser/math.js'], function (math) {
// evaluate some expression
const result = math.evaluate('1.2 * (2 + 4.5)')
document.write(result)

View File

@ -18,7 +18,7 @@ File: [requirejs_loading.html](requirejs_loading.html) (click for a live demo)
<script>
// load math.js using require.js
require(['https://unpkg.com/mathjs@14.4.0/lib/browser/math.js'], function (math) {
require(['https://unpkg.com/mathjs@14.5.0/lib/browser/math.js'], function (math) {
// evaluate some expression
const result = math.evaluate('1.2 * (2 + 4.5)')
document.write(result)

View File

@ -5,7 +5,7 @@
<meta charset="utf-8">
<title>math.js | rocket trajectory optimization</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
<style>

View File

@ -14,7 +14,7 @@ File: [rocket_trajectory_optimization.html](rocket_trajectory_optimization.html)
<meta charset="utf-8">
<title>math.js | rocket trajectory optimization</title>
<script src="https://unpkg.com/mathjs@14.4.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@14.5.0/lib/browser/math.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
<style>

View File

@ -92,7 +92,7 @@ File: [webworkers.html](webworkers.html) (click for a live demo)
File: [worker.js](worker.js)
```js
importScripts('https://unpkg.com/mathjs@14.4.0/lib/browser/math.js')
importScripts('https://unpkg.com/mathjs@14.5.0/lib/browser/math.js')
// create a parser
const parser = self.math.parser()

View File

@ -1,4 +1,4 @@
importScripts('https://unpkg.com/mathjs@14.4.0/lib/browser/math.js')
importScripts('https://unpkg.com/mathjs@14.5.0/lib/browser/math.js')
// create a parser
const parser = self.math.parser()

View File

@ -4,6 +4,17 @@ layout: default
<h1 id="history">History <a href="#history" title="Permalink">#</a></h1>
<h1 id="20250521-1450">2025-05-21, 14.5.0 <a href="#20250521-1450" title="Permalink">#</a></h1>
- Feat: improve the performance of the `map` and `forEach` methods of
`DenseMatrix` (<a href="https://github.com/josdejong/mathjs/issues/3446">#3446</a>). Thanks <a href="https://github.com/dvd101x">@dvd101x</a>.
- Feat: improve the performance of `subset` (<a href="https://github.com/josdejong/mathjs/issues/3467">#3467</a>). Thanks <a href="https://github.com/dvd101x">@dvd101x</a>.
- Feat: define embedded docs for `compile`, `evaluate`, `parse`, and `parser`,
and add tests for the examples in embedded docs (<a href="https://github.com/josdejong/mathjs/issues/3413">#3413</a>). Thanks <a href="https://github.com/dvd101x">@dvd101x</a>.
- Fix: <a href="https://github.com/josdejong/mathjs/issues/3450">#3450</a> support multiplication of valueless units by arbitrary types
(<a href="https://github.com/josdejong/mathjs/issues/3454">#3454</a>).
- Fix: <a href="https://github.com/josdejong/mathjs/issues/3474">#3474</a> correctly parse `(lbf in)` (<a href="https://github.com/josdejong/mathjs/issues/3476">#3476</a>). Thanks <a href="https://github.com/costerwi">@costerwi</a>.
<h1 id="20250328-1440">2025-03-28, 14.4.0 <a href="#20250328-1440" title="Permalink">#</a></h1>
- Feat: improve the performance of function `flatten` (<a href="https://github.com/josdejong/mathjs/issues/3400">#3400</a>). Thanks <a href="https://github.com/dvd101x">@dvd101x</a>.

File diff suppressed because one or more lines are too long

View File

@ -14,8 +14,8 @@
* It features real and complex numbers, units, matrices, a large set of
* mathematical functions, and a flexible expression parser.
*
* @version 14.4.0
* @date 2025-03-28
* @version 14.5.0
* @date 2025-05-21
*
* @license
* Copyright (C) 2013-2025 Jos de Jong <wjosdejong@gmail.com>

File diff suppressed because one or more lines are too long

@ -1 +1 @@
Subproject commit 4a25655dfbd19093984998ed1796d4083b64f859
Subproject commit 3b3be527f4c4c69b16c92ae2092462443414c1bb

28
package-lock.json generated
View File

@ -8,11 +8,11 @@
"name": "mathjs-website",
"version": "1.0.0",
"dependencies": {
"mathjs": "14.4.0"
"mathjs": "14.5.0"
},
"devDependencies": {
"fancy-log": "2.0.0",
"glob": "11.0.1",
"glob": "11.0.2",
"gulp": "5.0.0",
"gulp-header": "2.0.9",
"gulp-rename": "2.0.0",
@ -848,9 +848,9 @@
}
},
"node_modules/glob": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/glob/-/glob-11.0.1.tgz",
"integrity": "sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==",
"version": "11.0.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-11.0.2.tgz",
"integrity": "sha512-YT7U7Vye+t5fZ/QMkBFrTJ7ZQxInIUjwyAjVj84CYXqgBdv30MFUPGnBR6sQaVq6Is15wYJUsnzTuWaGRBhBAQ==",
"dev": true,
"license": "ISC",
"dependencies": {
@ -1483,9 +1483,9 @@
"dev": true
},
"node_modules/mathjs": {
"version": "14.4.0",
"resolved": "https://registry.npmjs.org/mathjs/-/mathjs-14.4.0.tgz",
"integrity": "sha512-CpoYDhNENefjIG9wU9epr+0pBHzlaySfpWcblZdAf5qXik/j/U8eSmx/oNbmXO0F5PyfwPGVD/wK4VWsTho1SA==",
"version": "14.5.0",
"resolved": "https://registry.npmjs.org/mathjs/-/mathjs-14.5.0.tgz",
"integrity": "sha512-/zg7ikD0zfb9Qogqr0EXIMwyHD9GKnkrAz7EGXvOD2e+4yQdKwQ4xqj5Mhk0TWT39IWhu3Pen3GXiUufkGHgOg==",
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.26.10",
@ -3163,9 +3163,9 @@
"dev": true
},
"glob": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/glob/-/glob-11.0.1.tgz",
"integrity": "sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==",
"version": "11.0.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-11.0.2.tgz",
"integrity": "sha512-YT7U7Vye+t5fZ/QMkBFrTJ7ZQxInIUjwyAjVj84CYXqgBdv30MFUPGnBR6sQaVq6Is15wYJUsnzTuWaGRBhBAQ==",
"dev": true,
"requires": {
"foreground-child": "^3.1.0",
@ -3633,9 +3633,9 @@
"dev": true
},
"mathjs": {
"version": "14.4.0",
"resolved": "https://registry.npmjs.org/mathjs/-/mathjs-14.4.0.tgz",
"integrity": "sha512-CpoYDhNENefjIG9wU9epr+0pBHzlaySfpWcblZdAf5qXik/j/U8eSmx/oNbmXO0F5PyfwPGVD/wK4VWsTho1SA==",
"version": "14.5.0",
"resolved": "https://registry.npmjs.org/mathjs/-/mathjs-14.5.0.tgz",
"integrity": "sha512-/zg7ikD0zfb9Qogqr0EXIMwyHD9GKnkrAz7EGXvOD2e+4yQdKwQ4xqj5Mhk0TWT39IWhu3Pen3GXiUufkGHgOg==",
"requires": {
"@babel/runtime": "^7.26.10",
"complex.js": "^2.2.5",

View File

@ -6,11 +6,11 @@
"url": "https://github.com/josdejong/mathjs.git"
},
"dependencies": {
"mathjs": "14.4.0"
"mathjs": "14.5.0"
},
"devDependencies": {
"fancy-log": "2.0.0",
"glob": "11.0.1",
"glob": "11.0.2",
"gulp": "5.0.0",
"gulp-header": "2.0.9",
"gulp-rename": "2.0.0",