Released mathjs v3.12.0

This commit is contained in:
jos 2017-04-17 20:47:22 +02:00
parent 4a676b3c08
commit 1c8a2b9b7d
26 changed files with 2575 additions and 2201 deletions

View File

@ -47,6 +47,7 @@ Function | Description
[math.lsolve(L, b)](functions/lsolve.html) | Solves the linear equation system by forwards substitution.
[math.lup(A)](functions/lup.html) | Calculate the Matrix LU decomposition with partial pivoting.
[math.lusolve(A, b)](functions/lusolve.html) | Solves the linear system `A * x = b` where `A` is an [n x n] matrix and `b` is a [n] column vector.
[math.qr(A)](functions/qr.html) | Calculate the Matrix QR decomposition.
[simplify(expr)](functions/simplify.html) | Simplify an expression tree.
[math.slu(A, order, threshold)](functions/slu.html) | Calculate the Sparse Matrix LU decomposition with full pivoting.
[math.usolve(U, b)](functions/usolve.html) | Solves the linear equation system by backward substitution.

View File

@ -0,0 +1,62 @@
---
layout: default
---
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
<h1 id="function-qr">Function qr <a href="#function-qr" title="Permalink">#</a></h1>
Calculate the Matrix QR decomposition. Matrix `A` is decomposed in
two matrices (`Q`, `R`) where `Q` is an
orthogonal matrix and `R` is an upper triangular matrix.
<h2 id="syntax">Syntax <a href="#syntax" title="Permalink">#</a></h2>
```js
math.qr(A);
```
<h3 id="parameters">Parameters <a href="#parameters" title="Permalink">#</a></h3>
Parameter | Type | Description
--------- | ---- | -----------
`A` | Matrix &#124; Array | A two dimensional matrix or array
<h3 id="returns">Returns <a href="#returns" title="Permalink">#</a></h3>
Type | Description
---- | -----------
{Q: Array &#124; Matrix, R: Array &#124; Matrix} | Q: the orthogonal
<h2 id="examples">Examples <a href="#examples" title="Permalink">#</a></h2>
```js
var m = [
[1, -1, 4],
[1, 4, -2],
[1, 4, 2],
[1, -1, 0]
];
var result = math.qr(m);
// r = {
// Q: [
// [0.5, -0.5, 0.5],
// [0.5, 0.5, -0.5],
// [0.5, 0.5, 0.5],
// [0.5, -0.5, -0.5],
// ],
// R: [
// [2, 3, 2],
// [0, 5, -2],
// [0, 0, 4],
// [0, 0, 0]
// ]
// }
```
<h2 id="see-also">See also <a href="#see-also" title="Permalink">#</a></h2>
[lu](lu.html)

View File

@ -36,18 +36,18 @@ Math.js can be downloaded or linked from [cdnjs](http://cdnjs.com/):
<table class="download">
<tr>
<td>
<a href="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.js">
Development (version 3.11.5)
<a href="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.js">
Development (version 3.12.0)
</a>
</td>
<td>
<span id="development-size">1510 kB</span>, uncompressed with comments
<span id="development-size">1518 kB</span>, uncompressed with comments
</td>
</tr>
<tr>
<td>
<a href="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js">
Production (version 3.11.5)
<a href="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js">
Production (version 3.12.0)
</a>
</td>
<td>

View File

@ -14,7 +14,7 @@
}
</style>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
</head>
<body>

View File

@ -23,7 +23,7 @@ File: [angle_configuration.html](angle_configuration.html)
}
</style>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
</head>
<body>

View File

@ -2,7 +2,7 @@
<html>
<head>
<title>math.js | basic usage</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
</head>
<body>

View File

@ -11,7 +11,7 @@ File: [basic_usage.html](basic_usage.html)
<html>
<head>
<title>math.js | basic usage</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
</head>
<body>

View File

@ -3,7 +3,7 @@
<head>
<title>math.js | currency conversion</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
<style>
body,

View File

@ -12,7 +12,7 @@ File: [currency_conversion.html](currency_conversion.html)
<head>
<title>math.js | currency conversion</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
<style>
body,

View File

@ -14,7 +14,7 @@
}
</style>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
</head>
<body>

View File

@ -23,7 +23,7 @@ File: [custom_separators.html](custom_separators.html)
}
</style>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
</head>
<body>

View File

@ -7,7 +7,7 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/2.2.0/es5-shim.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/2.2.0/es5-sham.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
</head>
<body>

View File

@ -16,7 +16,7 @@ File: [old_browsers.html](old_browsers.html)
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/2.2.0/es5-shim.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/2.2.0/es5-sham.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
</head>
<body>

View File

@ -2,7 +2,7 @@
<html>
<head>
<title>math.js | plot</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
<!-- load http://maurizzzio.github.io/function-plot/ -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>

View File

@ -11,7 +11,7 @@ File: [plot.html](plot.html)
<html>
<head>
<title>math.js | plot</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
<!-- load http://maurizzzio.github.io/function-plot/ -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>

View File

@ -3,7 +3,7 @@
<head>
<title>math.js | pretty printing with MathJax</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjax/2.3/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js"></script>
<style>

View File

@ -12,7 +12,7 @@ File: [pretty_printing_with_mathjax.html](pretty_printing_with_mathjax.html)
<head>
<title>math.js | pretty printing with MathJax</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjax/2.3/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js"></script>
<style>

View File

@ -8,7 +8,7 @@
<script>
// load math.js using require.js
require(['http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js'], function (math) {
require(['http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js'], function (math) {
// evaluate some expression
var result = math.eval('1.2 * (2 + 4.5)');
document.write(result);

View File

@ -17,7 +17,7 @@ File: [requirejs_loading.html](requirejs_loading.html)
<script>
// load math.js using require.js
require(['http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js'], function (math) {
require(['http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js'], function (math) {
// evaluate some expression
var result = math.eval('1.2 * (2 + 4.5)');
document.write(result);

View File

@ -91,7 +91,7 @@ File: [webworkers.html](webworkers.html)
File: [worker.js](worker.js)
```js
importScripts('http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js');
importScripts('http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js');
// create a parser
var parser = math.parser();

View File

@ -1,4 +1,4 @@
importScripts('http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.11.5/math.min.js');
importScripts('http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.12.0/math.min.js');
// create a parser
var parser = math.parser();

View File

@ -5,6 +5,12 @@ layout: default
<h1 id="history">History <a href="#history" title="Permalink">#</a></h1>
<h2 id="20170417-version-3120">2017-04-17, version 3.12.0 <a href="#20170417-version-3120" title="Permalink">#</a></h2>
- Implemented QR decomposition, function `math.qr`. Thanks @HarrySarson.
- Fixed #824: Calling `math.random()` freezes IE and node.js.
<h2 id="20170408-version-3115">2017-04-08, version 3.11.5 <a href="#20170408-version-3115" title="Permalink">#</a></h2>
- More security measures in the expression parser.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

32
js/lib/math.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
"url": "https://github.com/josdejong/mathjs.git"
},
"dependencies": {
"mathjs": "3.11.5"
"mathjs": "3.12.0"
},
"devDependencies": {
"glob": "^4.3.5",