Publish mathjs@6.2.3

This commit is contained in:
jos 2019-10-06 11:09:25 +02:00
parent c86c876b0b
commit 122895823d
27 changed files with 70 additions and 66 deletions

View File

@ -29,7 +29,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@6.2.2/">https://unpkg.com/mathjs@6.2.2/</a></td>
<td><a href="https://unpkg.com/mathjs@6.2.3/">https://unpkg.com/mathjs@6.2.3/</a></td>
</tr>
<tr>
<td>cdnjs</td>
@ -47,8 +47,8 @@ Here some direct download links from [unpkg](https://unpkg.com):
<table class="download">
<tr>
<td>
<a href="https://unpkg.com/mathjs@6.2.2/dist/math.js">
Development (version 6.2.2)
<a href="https://unpkg.com/mathjs@6.2.3/dist/math.js">
Development (version 6.2.3)
</a>
</td>
<td>
@ -57,8 +57,8 @@ Here some direct download links from [unpkg](https://unpkg.com):
</tr>
<tr>
<td>
<a href="https://unpkg.com/mathjs@6.2.2/dist/math.min.js">
Production (version 6.2.2)
<a href="https://unpkg.com/mathjs@6.2.3/dist/math.min.js">
Production (version 6.2.3)
</a>
</td>
<td>

View File

@ -15,7 +15,7 @@
}
</style>
<script src="https://unpkg.com/mathjs@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.js"></script>
<style>
body,

View File

@ -15,7 +15,7 @@
}
</style>
<script src="https://unpkg.com/mathjs@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.js"></script>
</head>
<body>

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>math.js | plot</title>
<script src="https://unpkg.com/mathjs@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.3/MathJax.js?config=TeX-AMS-MML_HTMLorMML.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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.3/MathJax.js?config=TeX-AMS-MML_HTMLorMML.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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.js"></script>
<style>
body {

View File

@ -9,7 +9,7 @@
<script>
// load math.js using require.js
require(['https://unpkg.com/mathjs@6.2.2/dist/math.min.js'], function (math) {
require(['https://unpkg.com/mathjs@6.2.3/dist/math.min.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@6.2.2/dist/math.min.js'], function (math) {
require(['https://unpkg.com/mathjs@6.2.3/dist/math.min.js'], function (math) {
// evaluate some expression
const result = math.evaluate('1.2 * (2 + 4.5)')
document.write(result)

View File

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

View File

@ -13,7 +13,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@6.2.2/dist/math.min.js"></script>
<script src="https://unpkg.com/mathjs@6.2.3/dist/math.min.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) (click for a live demo)
```js
importScripts('https://unpkg.com/mathjs@6.2.2/dist/math.min.js')
importScripts('https://unpkg.com/mathjs@6.2.3/dist/math.min.js')
// create a parser
const parser = self.math.parser()

View File

@ -1,4 +1,4 @@
importScripts('https://unpkg.com/mathjs@6.2.2/dist/math.min.js')
importScripts('https://unpkg.com/mathjs@6.2.3/dist/math.min.js')
// create a parser
const parser = self.math.parser()

View File

@ -5,6 +5,14 @@ layout: default
<h1 id="history">History <a href="#history" title="Permalink">#</a></h1>
<h1 id="20191006-version-623">2019-10-06, version 6.2.3 <a href="#20191006-version-623" title="Permalink">#</a></h1>
- Fixed <a href="https://github.com/josdejong/mathjs/issues/1640">#1640</a>: function `mean` not working for units. Thanks <a href="https://github.com/clintonc">@clintonc</a>.
- Fixed <a href="https://github.com/josdejong/mathjs/issues/1639">#1639</a>: function `min` listed twice in the "See also" section of the
embedded docs of function `std`.
- Improved performance of `isPrime`, see <a href="https://github.com/josdejong/mathjs/issues/1641">#1641</a>. Thanks <a href="https://github.com/arguiot">@arguiot</a>.
<h1 id="20190923-version-622">2019-09-23, version 6.2.2 <a href="#20190923-version-622" title="Permalink">#</a></h1>
- Fixed methods `map` and `clone` not copying the `dotNotation` property of

View File

@ -6,8 +6,8 @@
* It features real and complex numbers, units, matrices, a large set of
* mathematical functions, and a flexible expression parser.
*
* @version 6.2.2
* @date 2019-09-23
* @version 6.2.3
* @date 2019-10-06
*
* @license
* Copyright (C) 2013-2019 Jos de Jong <wjosdejong@gmail.com>
@ -26922,41 +26922,36 @@ Object(factory["a" /* factory */])(isPrime_name, isPrime_dependencies, function
*/
var isPrime = typed(isPrime_name, {
number: function number(x) {
if (x < 2) {
if (x * 0 !== 0) {
return false;
}
if (x === 2) {
return true;
if (x <= 3) {
return x > 1;
}
if (x % 2 === 0) {
if (x % 2 === 0 || x % 3 === 0) {
return false;
}
for (var i = 3; i * i <= x; i += 2) {
if (x % i === 0) {
for (var i = 5; i * i <= x; i += 6) {
if (x % i === 0 || x % (i + 2) === 0) {
return false;
}
}
return true;
},
BigNumber: function BigNumber(x) {
if (x.lt(2)) {
BigNumber: function BigNumber(n) {
if (n.toNumber() * 0 !== 0) {
return false;
}
if (x.equals(2)) {
return true;
}
if (n.lte(3)) return n.gt(1);
if (n.mod(2).eq(0) || n.mod(3).eq(0)) return false;
if (x.mod(2).isZero()) {
return false;
}
for (var i = new x.constructor(3); i.times(i).lte(x); i = i.plus(1)) {
if (x.mod(i).isZero()) {
for (var i = 5; n.gte(i * i); i += 6) {
if (n.mod(i).eq(0) || n.mod(i + 2).eq(0)) {
return false;
}
}
@ -50590,7 +50585,7 @@ var stdDocs = {
syntax: ['std(a, b, c, ...)', 'std(A)', 'std(A, normalization)'],
description: 'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',
examples: ['std(2, 4, 6)', 'std([2, 4, 6, 8])', 'std([2, 4, 6, 8], "uncorrected")', 'std([2, 4, 6, 8], "biased")', 'std([1, 2, 3; 4, 5, 6])'],
seealso: ['max', 'mean', 'min', 'median', 'min', 'prod', 'sum', 'variance']
seealso: ['max', 'mean', 'min', 'median', 'prod', 'sum', 'variance']
};
// CONCATENATED MODULE: ./src/expression/embeddedDocs/function/statistics/quantileSeq.js
var quantileSeqDocs = {
@ -54336,11 +54331,11 @@ Object(factory["a" /* factory */])(mean_name, mean_dependencies, function (_ref)
function _mean(array) {
var sum = 0;
var sum;
var num = 0;
deepForEach(array, function (value) {
try {
sum = add(sum, value);
sum = sum === undefined ? value : add(sum, value);
num++;
} catch (err) {
throw improveErrorMessage(err, 'mean', value);
@ -54348,7 +54343,7 @@ Object(factory["a" /* factory */])(mean_name, mean_dependencies, function (_ref)
});
if (num === 0) {
throw new Error('Cannot calculate mean of an empty array');
throw new Error('Cannot calculate the mean of an empty array');
}
return divide(sum, num);
@ -57495,7 +57490,8 @@ Object(factory["a" /* factory */])(simplify_name, simplify_dependencies, functio
{
l: '1*n',
r: 'n'
}];
} // this pattern can be produced by simplifyConstant
];
/**
* Parse the string array of rules into nodes
*
@ -59466,7 +59462,7 @@ Object(factory["a" /* factory */])(reviver_name, reviver_dependencies, function
};
});
// CONCATENATED MODULE: ./src/version.js
var version = '6.2.2'; // Note: This file is automatically generated when building math.js.
var version = '6.2.3'; // Note: This file is automatically generated when building math.js.
// Changes made in this file will be overwritten.
// CONCATENATED MODULE: ./src/plain/number/constants.js
var constants_pi = Math.PI;

8
js/lib/math.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

18
package-lock.json generated
View File

@ -495,9 +495,9 @@
"dev": true
},
"commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
"version": "2.20.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.1.tgz",
"integrity": "sha512-cCuLsMhJeWQ/ZpsFTbE765kvVfoeSddc4nU3up4fV+fDBcfUXnbITJ+JzhkdjzOqhURjZgujxaioam4RM9yGUg==",
"dev": true,
"optional": true
},
@ -1811,9 +1811,9 @@
}
},
"handlebars": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz",
"integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==",
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.2.tgz",
"integrity": "sha512-cIv17+GhL8pHHnRJzGu2wwcthL5sb8uDKBHvZ2Dtu5s1YNt0ljbzKbamnc+gr69y7bzwQiBdr5+hOpRd5pnOdg==",
"dev": true,
"requires": {
"neo-async": "^2.6.0",
@ -2317,9 +2317,9 @@
}
},
"mathjs": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/mathjs/-/mathjs-6.2.2.tgz",
"integrity": "sha512-l0qw0meh1rcGaFMh248wx6NE5RVWA2bleq+5xF44XAaPMHcou+cKq/0ASBnTDsp0zNAbUYm7tGkDEe6QHbzU8g==",
"version": "6.2.3",
"resolved": "https://registry.npmjs.org/mathjs/-/mathjs-6.2.3.tgz",
"integrity": "sha512-IEYTyz8tu7nslF4j2TtDs7C+9Emi2/iJTYXjc5WLoIKTJOLLtjp3Aglys0ZbV9KSiaJhpfGPLXm8Z5d7vEGN3w==",
"requires": {
"complex.js": "2.0.11",
"decimal.js": "10.2.0",

View File

@ -6,7 +6,7 @@
"url": "https://github.com/josdejong/mathjs.git"
},
"dependencies": {
"mathjs": "6.2.2"
"mathjs": "6.2.3"
},
"devDependencies": {
"fancy-log": "1.3.3",
@ -15,7 +15,7 @@
"gulp-header": "2.0.9",
"gulp-rename": "1.4.0",
"gulp-replace": "1.0.0",
"handlebars": "4.1.2",
"handlebars": "4.4.2",
"rimraf": "3.0.0"
},
"scripts": {