Comparing version 0.9.0 to 0.9.1
@@ -5,2 +5,14 @@ # math.js history | ||
## 2013-06-14, version 0.9.1 | ||
- Implemented element-wise functions and operators: `emultiply` (`x .* y`), | ||
`edivide` (`x ./ y`), `epow` (`x .^ y`). | ||
- Added constants `Infinity` and `NaN`. | ||
- Removed support for Workspace to keep the library focused on its core task. | ||
- Fixed a bug in the Complex constructor, not accepting NaN values. | ||
- Fixed division by zero in case of pure complex values. | ||
- Fixed a bug in function multiply multiplying a pure complex value with | ||
Infinity. | ||
## 2013-05-29, version 0.9.0 | ||
@@ -7,0 +19,0 @@ |
{ | ||
"name": "mathjs", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "Math.js is an extensive math library for JavaScript and Node.js. It features real and complex numbers, units, matrices, a large set of mathematical functions, and a flexible expression parser.", | ||
@@ -5,0 +5,0 @@ "author": "Jos de Jong <wjosdejong@gmail.com>", |
@@ -328,41 +328,2 @@ ![math.js](https://raw.github.com/josdejong/mathjs/master/img/mathjs.png) | ||
## Workspace | ||
Math.js features a workspace, which manages a set of expressions. | ||
Expressions can be added, replace, deleted, and inserted in the workspace. | ||
The workspace keeps track on the dependencies between the expressions, | ||
and automatically updates results of depending expressions when variables | ||
or function definitions are changed in the workspace. | ||
```js | ||
// load math.js | ||
var math = require('mathjs'); | ||
// create a workspace | ||
var workspace = math.workspace(); | ||
// add expressions to the workspace | ||
var id0 = workspace.append('a = 3/4'); | ||
var id1 = workspace.append('a + 2'); | ||
workspace.getResult(id1); // 2.75 | ||
// replace expressions in the workspace | ||
workspace.replace('a=5/2', id0); | ||
workspace.getResult(id1); // 4.5 | ||
``` | ||
Available methods: | ||
var id = workspace.append(expr); | ||
var id = workspace.insertBefore(expr, beforeId); | ||
var id = workspace.insertAfter(expr, afterId); | ||
workspace.replace(expr, id); | ||
workspace.remove(id); | ||
workspace.clear(); | ||
var expr = workspace.getExpr(id); | ||
var result = workspace.getResult(id); | ||
var deps = workspace.getDependencies(id); | ||
var changes = workspace.getChanges(updateSeq); | ||
## Data types | ||
@@ -490,2 +451,3 @@ | ||
- math.I, math.i | ||
- math.Infinity | ||
- math.LN2 | ||
@@ -495,2 +457,3 @@ - math.LN10 | ||
- math.LOG10E | ||
- math.NaN | ||
- math.PI, math.pi | ||
@@ -501,2 +464,29 @@ - math.SQRT1_2 | ||
## Operators | ||
The following operators are available in the expression parser of math.js. | ||
- x + y (add) | ||
- x - y (subtract) | ||
- x * y (multiply) | ||
- x .* y (element-wise multiply) | ||
- x / y (divide) | ||
- x ./ y (element-wise divide) | ||
- x % y (mod) | ||
- x ^ y (power) | ||
- x ^ y (element-wise power) | ||
- -y (unary minus) | ||
- y' (transpose) | ||
- y! (factorial) | ||
- x = y (assignment) | ||
- x : y (range) | ||
- x in y (unit conversion) | ||
- x == y (equal) | ||
- x != y (unequal) | ||
- x < y (smaller) | ||
- x > y (larger) | ||
- x <= y (smallereq) | ||
- x >= y (largereq) | ||
## Methods | ||
@@ -514,2 +504,5 @@ | ||
- math.divide(x, y) | ||
- math.edivide(x, y) | ||
- math.emultiply(x, y) | ||
- math.epow(x, y) | ||
- math.equal(x) | ||
@@ -555,3 +548,2 @@ - math.exp(x) | ||
- math.unit(x) | ||
- math.workspace() | ||
@@ -558,0 +550,0 @@ ### Matrix |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16
432942
9808
747