UNPKG

73.9 kBMarkdownView Raw
1# History
2
3
4# 2019-05-18, version 5.10.3
5
6- Fixed dependency `del` being a dependency instead of devDependency.
7
8
9# 2019-05-18, version 5.10.2
10
11- Fix #1515, #1516, #1517: broken package due to a naming conflict in
12 the build folder of a util file `typeOf.js` and `typeof.js`.
13 Solved by properly cleaning all build folders before building.
14
15
16# 2019-05-17, version 5.10.1
17
18- Fix #1512: format using notation `engineering` can give wrong results
19 when the value has less significant digits than the number of digits in
20 the output.
21
22
23# 2019-05-08, version 5.10.0
24
25- Fix `lib/header.js` not having filled in date and version. Thanks @kevjin.
26- Upgraded dependency `decimal.js@10.2.0`, fixing an issue on node.js 12.
27
28
29# 2019-04-08, version 5.9.0
30
31- Implemented functions `row` and `column` (see #1413). Thanks @SzechuanSage.
32- Fixed #1459: `engineering` notation of function `format` not available
33 for `BigNumber`.
34- Fixed #1465: `node.toHTML()` not correct for unary operators like
35 `factorial`.
36
37
38# 2019-03-20, version 5.8.0
39
40- Implemented new function `apply`. Thanks @bnlcas.
41- Implemented passing an optional `dimension` argument to `std` and `var`.
42 Thanks @bnlcas.
43
44
45# 2019-03-10, version 5.7.0
46
47- Implemented support for `pow()` in `derivative`. Thanks @sam-19.
48- Gracefully handle round-off errors in fix, ceil, floor, and range
49 (Fixes #1429, see also #1434, #1432). Thanks @ericman314.
50
51
52# 2019-03-02, version 5.6.0
53
54- Upgrade decimal.js to v10.1.1 (#1421).
55- Fixed #1418: missing whitespace when stringifying an expression
56 containing "not".
57
58
59# 2019-02-20, version 5.5.0
60
61- Fixed #1401: methods `map` and `forEach` of `SparseMatrix` not working
62 correctly when indexes are unordered.
63- Fixed #1404: inconsistent rounding of negative numbers.
64- Upgrade tiny-emitter to v2.1.0 (#1397).
65
66
67# 2019-01-25, version 5.4.2
68
69- Fixed `math.format` not working for BigNumbers with a precision above
70 1025 digits (see #1385). Thanks @ericman314.
71- Fixed incorrect LaTeX output of `RelationalNode`. Thanks @rianmcguire.
72- Fixed a bug the methods `map`, `forEach`, `traverse`, and `transform`
73 of `FunctionNode`.
74
75
76# 2019-01-10, version 5.4.1
77
78- Fix #1378: negative bignumbers not formatted correctly.
79- Upgrade fraction.js to version 4.0.12 (#1369).
80
81
82# 2018-12-09, version 5.4.0
83
84- Extended sum.js to accept a dimension input to calculate the sum over a
85 specific axis. Thanks @bnlcas.
86- Fix #1328: objects can't be written multi-line. Thanks @GHolk.
87- Remove side effects caused by `Unit.format` and `Unit.toString`,
88 making changes to the unit on execution. Thanks @ericman314.
89
90
91# 2018-12-03, version 5.3.1
92
93- Fixed #1336: Unit.toSI() returning units with prefix like `mm` instead
94 of `m`. Thanks @ericman314.
95
96
97# 2018-11-29, version 5.3.0
98
99- Implemented function `hasNumericValue`. Thanks @Sathish-kumar-Subramani.
100- Fix #1326: non-ascii character in print.js.
101- Fix #1337: `math.format` not working correctly with `{ precision: 0 }`.
102 Thanks @dkenul.
103
104
105# 2018-10-30, version 5.2.3
106
107- Fixed #1293: non-unicode characters in `escape-latex` giving issues in some
108 specific cases. Thanks @dangmai.
109- Fixed incorrect LaTeX output of function `bitNot`, see #1299. Thanks @FSMaxB.
110- Fixed #1304: function `pow` not supporting inputs `pow(Unit, BigNumber)`.
111- Upgraded dependencies (`escape-latex@1.2.0`)
112
113
114# 2018-10-23, version 5.2.2
115
116- Fixed #1286: Fixed unit base recognition and formatting for
117 user-defined units. Thanks @ericman314.
118
119
120# 2018-10-18, version 5.2.1
121
122- Fixed unit `rod` being defined as `5.02921` instead of `5.0292`.
123 Thanks @ericman314.
124- Upgraded dependencies (`fraction.js@4.0.10`)
125- Upgraded devDependencies (`@babel/core@7.1.2`, `nyc@13.1.0`,
126 `webpack@4.21.0`).
127
128
129# 2018-10-05, version 5.2.0
130
131- Implemented support for chained conditionals like `10 < x <= 50`.
132 Thanks @ericman314.
133- Add an example showing a proof of concept of using `BigInt` in mathjs.
134- Fixed #1269: Bugfix for BigNumber divided by unit. Thanks @ericman314.
135- Fixed #1240: allow units having just a value and no unit.
136 Thanks @ericman314.
137
138
139## 2018-09-09, version 5.1.2
140
141- Fixed a typo in the docs of `parse`. Thanks @mathiasvr.
142- Fixed #1222: a typo in the docs of `subset`.
143- Fixed #1236: `quantileSeq` has inconsistent return.
144- Fixed #1237: norm sometimes returning a complex number instead of
145 number.
146- Upgraded dependencies (`fraction.js@4.0.9`)
147- Upgraded devDependencies (`babel@7`, `karma-webpack@3.0.4`,
148 `nyc@13.0.1`, `standard@12.0.0`, `uglify-js@3.4.9`, `webpack@4.17.2`)
149
150
151## 2018-08-21, version 5.1.1
152
153- Function `isNumeric` now recognizes more types.
154- Fixed #1214: functions `sqrt`, `max`, `min`, `var`, `std`, `mode`, `mad`,
155 `median`, and `partitionSelect` not neatly handling `NaN` inputs. In some
156 cases (`median`, `mad`, and `partitionSelect`) this resulted in an infinite
157 loop.
158- Upgraded dependencies (`escape-latex@1.1.1`)
159- Upgraded devDependencies (`webpack@4.17.0`)
160
161
162## 2018-08-12, version 5.1.0
163
164- Implemented support for strings enclosed in single quotes.
165 Thanks @jean-emmanuel.
166- Implemented function `getMatrixDataType`. Thanks @JasonShin.
167- Implemented new `options` argument in `simplify`. Thanks @paulobuchsbaum.
168- Bug fixes in `rationalize`, see #1173. Thanks @paulobuchsbaum.
169
170
171## 2018-07-22, version 5.0.4
172
173- Strongly improved the performance of functions `factorial` for numbers.
174 This improves performance of functions `gamma`, `permutation`, and
175 `combination` too. See #1170. Thanks @honeybar.
176- Strongly improved the performance of function `reshape`, thanks to a
177 friend of @honeybar.
178
179
180## 2018-07-14, version 5.0.3
181
182- Fixed many functions (for example `add` and `subtract`) not working
183 with matrices having a `datatype` defined.
184- Fixed #1147: bug in `format` with `engineering` notation in outputting
185 the correct number of significant figures. Thanks @ericman314.
186- Fixed #1162: transform functions not being cleaned up when overriding
187 it by importing a factory function with the same name.
188- Fixed broken links in the documentation. Thanks @stropitek.
189- Refactored the code of `parse` into a functional approach.
190 Thanks @harrysarson.
191- Changed `decimal.js` import to ES6. Thanks @weinshel.
192
193
194## 2018-07-07, version 5.0.2
195
196- Fixed #1136: rocket trajectory example broken (since v4.0.0).
197- Fixed #1137: `simplify` unnecessarily replacing implicit multiplication with
198 explicit multiplication.
199- Fixed #1146: `rationalize` throwing exceptions for some input with decimals.
200 Thanks @maruta.
201- Fixed #1088: function arguments not being passed to `rawArgs` functions.
202- Fixed advanced example `add_new_datatypes`.
203- Fixed mathjs core constants not working without complex numbers.
204 Thanks @ChristopherChudzicki.
205- Fixed a broken link in the documentation on units. Thanks @stropitek.
206- Upgraded dependencies (`typed-function@1.0.4`, `complex.js@2.0.11`).
207- Upgraded devDependencies (`babel-loader@7.1.5 `, `uglify-js@3.4.3`,
208 `expr-eval@1.2.2`, `webpack@4.15.1`).
209
210
211## 2018-07-01, version 5.0.1
212
213- Improved error messaging when converting units. Thanks @gap777.
214- Upgraded devDependencies (`kerma`, `uglify-js`, `webpack`).
215
216
217## 2018-06-16, version 5.0.0
218
219!!! BE CAREFUL: BREAKING CHANGES !!!
220
221- Implemented complex conjugate transpose `math.ctranspose`. See #1097.
222 Thanks @jackschmidt.
223- Changed the behavior of `A'` (transpose) in the expression parser to
224 calculate the complex conjugate transpose. See #1097. Thanks @jackschmidt.
225- Added support for `complex({abs: 1, arg: 1})`, and improved the docs on
226 complex numbers. Thanks @ssaket.
227- Renamed `eye` to `identity`, see #1054.
228- Math.js code can now contain ES6. The ES6 source code is moved from `lib`
229 to `src`, and `lib` now contains the compiled ES5 code.
230- Upgraded dependencies:
231 - `decimal.js` from `9.0.1` to `10.0.1`
232 - Upgraded dev dependencies
233- Changed code style to https://standardjs.com/, run linter on `npm test`.
234 See #1110.
235- Dropped support for bower. Use npm or an other package manages instead.
236- Dropped support for (non-primitive) instances of `Number`, `Boolean`, and
237 `String` from functions `clone` and `typeof`.
238- Dropped official support for IE9 (probably still works, but it's not tested).
239- Fixed #851: More consistent behavior of sqrt, nthRoot, and pow.
240 Thanks @dakotablair.
241- Fixed #1103: Calling `toTex` on node that contains `derivative` causing
242 an exception. Thanks @joelhoover.
243
244
245## 2018-06-02, version 4.4.2
246
247- Drastically improved the performance of `det`. Thanks @ericman314.
248- Fixed #1065, #1121: Fixed wrong documentation of function
249 `compareNatural` and clarified the behavior for strings.
250- Fixed #1122 a regression in function `inv` (since `v4.4.1`).
251 Thanks @ericman314.
252
253
254## 2018-05-29, version 4.4.1
255
256- Fixed #1109: a bug in `inv` when dealing with values close to zero.
257 Thanks @ericman314.
258
259
260## 2018-05-28, version 4.4.0
261
262- Implemented functions `equalText` and `compareText`. See #1085.
263
264
265## 2018-05-21, version 4.3.0
266
267- Implemented matrix exponential `math.expm`. Thanks @ericman314.
268- Fixed #1101: math.js bundle not working when loading in a WebWorker.
269- Upgraded dependencies
270 - `complex.js` from `v2.0.2` to `v2.0.10`.
271 - `fraction.js` from `v4.0.4` to `v4.0.8`.
272- Upgraded devDependencies (`mocha`, `uglify-js`, `webpack`).
273
274
275## 2018-05-05, version 4.2.2
276
277- Fixed calculating the Frobenius norm of complex matrices correctly,
278 see #1098. Thanks @jackschmidt.
279- Fixed #1076: cannot use mathjs in React VR by updating to
280 `escape-latex@1.0.3`.
281
282
283## 2018-05-02, version 4.2.1
284
285- Fixed `dist/math.js` being minified.
286
287
288## 2018-05-02, version 4.2.0
289
290- Implemented function `math.sqrtm`. Thanks @ferrolho.
291- Implemented functions `math.log2`, `math.log1p`, and `math.expm1`.
292 Thanks @BigFav and @harrysarson.
293- Fixed some unit tests broken on nodejs v10.
294- Upgraded development dependencies.
295- Dropped integration testing on nodejs v4.
296
297
298## 2018-04-18, version 4.1.2
299
300- Fixed #1082: implemented support for unit plurals `decades`, `centuries`,
301 and `millennia`.
302- Fixed #1083: units `decade` and `watt` having a wrong name when stringifying.
303 Thanks @ericman314.
304
305
306## 2018-04-11, version 4.1.1
307
308- Fixed #1063: derivative not working when resolving a variable with unary
309 minus like `math.derivative('-x', 'x')`.
310
311
312## 2018-04-08, version 4.1.0
313
314- Extended function `math.print` with support for arrays and matrices.
315 Thanks @jean-emmanuel.
316- Fixed #1077: Serialization/deserialization to JSON with reviver not being
317 supported by nodes.
318- Fixed #1016: Extended `math.typeof` with support for `ResultSet` and nodes
319 like `SymbolNode`.
320- Fixed #1072: Added support for long and short prefixes for the unit `bar`
321 (i.e. `millibar` and `mbar`).
322
323
324## 2018-03-17, version 4.0.1
325
326- Fixed #1062: mathjs not working on ES5 browsers like IE11 and Safari 9.3.
327- Fixed #1061: `math.unit` not accepting input like `1/s`.
328
329
330## 2018-02-25, version 4.0.0
331
332!!! BE CAREFUL: BREAKING CHANGES !!!
333
334Breaking changes (see also #682):
335
336- **New expression compiler**
337
338 The compiler of the expression parser is replaced with one that doesn't use
339 `eval` internally. See #1019. This means:
340
341 - a slightly improved performance on most browsers.
342 - less risk of security exploits.
343 - the code of the new compiler is easier to understand, maintain, and debug.
344
345 Breaking change here: When using custom nodes in the expression parser,
346 the syntax of `_compile` has changed. This is an undocumented feature though.
347
348- **Parsed expressions**
349
350 - The class `ConstantNode` is changed such that it just holds a value
351 instead of holding a stringified value and it's type.
352 `ConstantNode(valueStr, valueType`) is now `ConstantNode(value)`
353 Stringification uses `math.format`, which may result in differently
354 formatted numeric output.
355
356 - The constants `true`, `false`, `null`, `undefined`, `NaN`, `Infinity`,
357 and `uninitialized` are now parsed as ConstantNodes instead of
358 SymbolNodes in the expression parser. See #833.
359
360- **Implicit multiplication**
361
362 - Changed the behavior of implicit multiplication to have higher
363 precedence than explicit multiplication and division, except in
364 a number of specific cases. This gives a more natural behavior
365 for implicit multiplications. For example `24h / 6h` now returns `4`,
366 whilst `1/2 kg` evaluates to `0.5 kg`. Thanks @ericman314. See: #792.
367 Detailed documentation: https://github.com/josdejong/mathjs/blob/v4/docs/expressions/syntax.md#implicit-multiplication.
368
369 - Immediately invoking a function returned by a function like `partialAdd(2)(3)`
370 is no longer supported, instead these expressions are evaluated as
371 an implicit multiplication `partialAdd(2) * (3)`. See #1035.
372
373- **String formatting**
374
375 - In function `math.format`, the options `{exponential: {lower: number, upper: number}}`
376 (where `lower` and `upper` are values) are replaced with `{lowerExp: number, upperExp: number}`
377 (where `lowerExp` and `upperExp` are exponents). See #676. For example:
378 ```js
379 math.format(2000, {exponential: {lower: 1e-2, upper: 1e2}})
380 ```
381 is now:
382 ```js
383 math.format(2000, {lowerExp: -2, upperExp: 2})
384 ```
385
386 - In function `math.format`, the option `notation: 'fixed'` no longer rounds to
387 zero digits when no precision is specified: it leaves the digits as is.
388 See #676.
389
390- **String comparison**
391
392 Changed the behavior of relational functions (`compare`, `equal`,
393 `equalScalar`, `larger`, `largerEq`, `smaller`, `smallerEq`, `unequal`)
394 to compare strings by their numeric value they contain instead of
395 alphabetically. This also impacts functions `deepEqual`, `sort`, `min`,
396 `max`, `median`, and `partitionSelect`. Use `compareNatural` if you
397 need to sort an array with text. See #680.
398
399- **Angle units**
400
401 Changed `rad`, `deg`, and `grad` to have short prefixes,
402 and introduced `radian`, `degree`, and `gradian` and their plurals
403 having long prefixes. See #749.
404
405- **Null**
406
407 - `null` is no longer implicitly casted to a number `0`, so input like
408 `math.add(2, null)` is no longer supported. See #830, #353.
409
410 - Dropped constant `uninitialized`, which was used to initialize
411 leave new entries undefined when resizing a matrix is removed.
412 Use `undefined` instead to indicate entries that are not explicitly
413 set. See #833.
414
415- **New typed-function library**
416
417 - The `typed-function` library used to check the input types
418 of functions is completely rewritten and doesn't use `eval` under
419 the hood anymore. This means a reduced security risk, and easier
420 to debug code. The API is the same, but error messages may differ
421 a bit. Performance is comparable but may differ in specific
422 use cases and browsers.
423
424Non breaking changes:
425
426- Thanks to the new expression compiler and `typed-function` implementation,
427 mathjs doesn't use JavaScript's `eval` anymore under the hood.
428 This allows using mathjs in environments with security restrictions.
429 See #401.
430- Implemented additional methods `isUnary()` and `isBinary()` on
431 `OperatorNode`. See #1025.
432- Improved error messages for statistical functions.
433- Upgraded devDependencies.
434- Fixed #1014: `derivative` silently dropping additional arguments
435 from operator nodes with more than two arguments.
436
437
438## 2018-02-07, version 3.20.2
439
440- Upgraded to `typed-function@0.10.7` (bug-fix release).
441- Fixed option `implicit` not being copied from an `OperatorNode`
442 when applying function `map`. Thanks @HarrySarson.
443- Fixed #995: spaces and underscores not property being escaped
444 in `toTex()`. Thanks @FSMaxB.
445
446
447## 2018-01-17, version 3.20.1
448
449- Fixed #1018: `simplifyCore` failing in some cases with parentheses.
450 Thanks @firepick1.
451
452
453## 2018-01-14, version 3.20.0
454
455- Implement support for 3 or more arguments for operators `+` and `*` in
456 `derivative`. Thanks @HarrySarson. See #1002.
457- Fixed `simplify` evalution of `simplify` of functions with more than two
458 arguments wrongly: `simplify('f(x, y, z)') evaluated to `f(f(x, y), z)`
459 instead of `f(x, y, z)`. Thanks @joelhoover.
460- Fixed `simplify` throwing an error in some cases when simplifying unknown
461 functions, for example `simplify('f(4)')`. Thanks @joelhoover.
462- Fixed #1013: `simplify` wrongly simplifing some expressions containing unary
463 minus, like `0 - -x`. Thanks @joelhoover.
464- Fixed an error in an example in the documentation of `xor`. Thanks @denisx.
465
466
467## 2018-01-06, version 3.19.0
468
469- Extended functions `distance` and `intersect` with support for BigNumbers.
470 Thanks @ovk.
471- Improvements in function `simplify`: added a rule that allows combining
472 of like terms in embedded quantities. Thanks @joelhoover.
473
474
475## 2017-12-28, version 3.18.1
476
477- Fixed #998: An issue with simplifying an expression containing a subtraction.
478 Thanks @firepick1.
479
480
481## 2017-12-16, version 3.18.0
482
483- Implemented function `rationalize`. Thanks @paulobuchsbaum.
484- Upgraded dependencies:
485 ```
486 decimal.js 7.2.3 → 9.0.1 (no breaking changes affecting mathjs)
487 fraction.js 4.0.2 → 4.0.4
488 tiny-emitter 2.0.0 → 2.0.2
489 ```
490- Upgraded dev dependencies.
491- Fixed #975: a wrong example in the docs of lusolve.
492- Fixed #983: `pickRandom` returning an array instead of single value
493 when input was an array with just one value. Clarified docs.
494- Fixed #969: preven issues with yarn autoclean by renaming an
495 interally used folder "docs" to "embeddedDocs".
496
497
498## 2017-11-18, version 3.17.0
499
500- Improved `simplify` for nested exponentiations. Thanks @IvanVergiliev.
501- Fixed a security issue in `typed-function` allowing arbitrary code execution
502 in the JavaScript engine by creating a typed function with JavaScript code
503 in the name. Thanks Masato Kinugawa.
504- Fixed a security issue where forbidden properties like constructor could be
505 replaced by using unicode characters when creating an object. No known exploit,
506 but could possibly allow arbitrary code execution. Thanks Masato Kinugawa.
507
508
509## 2017-10-18, version 3.16.5
510
511- Fixed #954: Functions `add` and `multiply` not working when
512 passing three or more arrays or matrices.
513
514
515## 2017-10-01, version 3.16.4
516
517- Fixed #948, #949: function `simplify` returning wrong results or
518 running into an infinite recursive loop. Thanks @ericman314.
519- Fixed many small issues in the embedded docs. Thanks @Schnark.
520
521
522## 2017-08-28, version 3.16.3
523
524- Fixed #934: Wrong simplification of unary minus. Thanks @firepick1.
525- Fixed #933: function `simplify` reordering operations. Thanks @firepick1.
526- Fixed #930: function `isNaN` returning wrong result for complex
527 numbers having just one of their parts (re/im) being `NaN`.
528- Fixed #929: `FibonacciHeap.isEmpty` returning wrong result.
529
530
531## 2017-08-20, version 3.16.2
532
533- Fixed #924: a regression in `simplify` not accepting the signature
534 `simplify(expr, rules, scope)` anymore. Thanks @firepick1.
535- Fixed missing parenthesis when stringifying expressions containing
536 implicit multiplications (see #922). Thanks @FSMaxB.
537
538
539## 2017-08-12, version 3.16.1
540
541- For security reasons, type checking is now done in a more strict
542 way using functions like `isComplex(x)` instead of duck type checking
543 like `x && x.isComplex === true`.
544- Fixed #915: No access to property "name".
545- Fixed #901: Simplify units when calling `unit.toNumeric()`.
546 Thanks @AlexanderBeyn.
547- Fixed `toString` of a parsed expression tree containing an
548 immediately invoked function assignment not being wrapped in
549 parenthesis (for example `(f(x) = x^2)(4)`).
550
551
552## 2017-08-06, version 3.16.0
553
554- Significant performance improvements in `math.simplify`.
555 Thanks @firepick1.
556- Improved API for `math.simplify`, optionally pass a scope with
557 variables which are resolved, see #907. Thanks @firepick1.
558- Fixed #912: math.js didn't work on IE10 anymore (regression
559 since 3.15.0).
560
561
562## 2017-07-29, version 3.15.0
563
564- Added support for the dollar character `$` in symbol names (see #895).
565- Allow objects with prototypes as scope again in the expression parser,
566 this was disabled for security reasons some time ago. See #888, #899.
567 Thanks @ThomasBrierley.
568- Fixed #846: Issues in the functions `map`, `forEach`, and `filter`
569 when used in the expression parser:
570 - Not being able to use a function assignment as inline expression
571 for the callback function.
572 - Not being able to pass an inline expression as callback for `map`
573 and `forEach`.
574 - Index and original array/matrix not passed in `map` and `filter`.
575
576
577## 2017-07-05, version 3.14.2
578
579- Upgraded to `fraction.js@4.0.2`
580- Fixed #891 using BigNumbers not working in browser environments.
581
582
583## 2017-06-30, version 3.14.1
584
585- Reverted to `fraction.js@4.0.0`, there is an issue with `4.0.1`
586 in the browser.
587
588
589## 2017-06-30, version 3.14.0
590
591- Implemented set methods `setCartesian`, `setDifference`,
592 `setDistinct`, `setIntersect`, `setIsSubset`, `setPowerset`,
593 `setSize`. Thanks @Nekomajin42.
594- Implemented method `toHTML` on nodes. Thanks @Nekomajin42.
595- Implemented `compareNatural` and `sort([...], 'natural')`.
596- Upgraded dependencies to the latest versions:
597 - `complex.js@2.0.4`
598 - `decimal.js@7.2.3`
599 - `fraction.js@4.0.1`
600 - `tiny-emitter@2.0.0`
601 - And all devDependencies.
602- Fixed #865: `splitUnit` can now deal with round-off errors.
603 Thanks @ericman314.
604- Fixed #876: incorrect definition for unit `erg`. Thanks @pjhampton.
605- More informative error message when using single quotes instead of
606 double quotes around a string. Thanks @HarrySarson.
607
608
609## 2017-05-27, version 3.13.3
610
611- Fixed a bug in function `intersection` of line and plane.
612 Thanks @viclai.
613- Fixed security vulnerabilities.
614
615
616## 2017-05-26, version 3.13.2
617
618- Disabled function `chain` inside the expression parser for security
619 reasons (it's not needed there anyway).
620- Fixed #856: function `subset` not returning non-primitive scalars
621 from Arrays correctly. (like `math.eval('arr[1]', {arr: [math.bignumber(2)]})`.
622- Fixed #861: physical constants not available in the expression parser.
623
624
625## 2017-05-12, version 3.13.1
626
627- Fixed creating units with an alias not working within the expression
628 parser.
629- Fixed security vulnerabilities. Thanks Sam.
630
631
632## 2017-05-12, version 3.13.0
633
634- Command line application can now evaluate inline expressions
635 like `mathjs 1+2`. Thanks @slavaGanzin.
636- Function `derivative` now supports `abs`. Thanks @tetslee.
637- Function `simplify` now supports BigNumbers. Thanks @tetslee.
638- Prevent against endless loops in `simplify`. Thanks @tetslee.
639- Fixed #813: function `simplify` converting small numbers to inexact
640 Fractions. Thanks @tetslee.
641- Fixed #838: Function `simplify` now supports constants like `e`.
642 Thanks @tetslee.
643
644
645## 2017-05-05, version 3.12.3
646
647- Fixed security vulnerabilities. Thanks Dan and Sam.
648
649
650## 2017-04-30, version 3.12.2
651
652- Added a rocket trajectory optimization example.
653
654
655## 2017-04-24, version 3.12.1
656
657- Fixed #804
658 - Improved handling of powers of `Infinity`. Thanks @HarrySarson.
659 - Fixed wrong formatting of complex NaN.
660- Fixed security vulnerabilities in the expression parser.
661 Thanks Sam and Dan.
662
663
664## 2017-04-17, version 3.12.0
665
666- Implemented QR decomposition, function `math.qr`. Thanks @HarrySarson.
667- Fixed #824: Calling `math.random()` freezes IE and node.js.
668
669
670## 2017-04-08, version 3.11.5
671
672- More security measures in the expression parser.
673 WARNING: the behavior of the expression parser is now more strict,
674 some undocumented features may not work any longer.
675 - Accessing and assigning properties is now only allowed on plain
676 objects, not on classes, arrays, and functions anymore.
677 - Accessing methods is restricted to a set of known, safe methods.
678
679
680## 2017-04-03, version 3.11.4
681
682- Fixed a security vulnerability in the expression parser. Thanks @xfix.
683
684
685## 2017-04-03, version 3.11.3
686
687- Fixed a security vulnerability in the expression parser. Thanks @xfix.
688
689
690## 2017-04-03, version 3.11.2
691
692- Fixed a security vulnerability in the expression parser. Thanks @xfix.
693
694
695## 2017-04-02, version 3.11.1
696
697- Fixed security vulnerabilities in the expression parser.
698 Thanks Joe Vennix and @xfix.
699
700
701## 2017-04-02, version 3.11.0
702
703- Implemented method Unit.toSI() to convert a unit to base SI units.
704 Thanks @ericman314.
705- Fixed #821, #822: security vulnerabilities in the expression parser.
706 Thanks @comex and @xfix.
707
708
709## 2017-03-31, version 3.10.3
710
711- More security fixes related to the ones fixed in `v3.10.2`.
712
713
714## 2017-03-31, version 3.10.2
715
716- Fixed a security vulnerability in the expression parser allowing
717 execution of arbitrary JavaScript. Thanks @CapacitorSet and @denvit.
718
719
720## 2017-03-26, version 3.10.1
721
722- Fixed `xgcd` for negative values. Thanks @litmit.
723- Fixed #807: function transform of existing functions not being removed when
724 overriding such a function.
725
726
727## 2017-03-05, version 3.10.0
728
729- Implemented function `reshape`. Thanks @patgrasso and @ericman314.
730- Implemented configuration option `seedRandom` for deterministic random
731 numbers. Thanks @morsecodist.
732- Small fixes in the docs. Thanks @HarrySarson.
733- Dropped support for component package manager (which became deprecated about
734 one and a half year ago).
735
736
737## 2017-02-22, version 3.9.3
738
739- Fixed #797: issue with production builds of React Native projects.
740- Fixed `math.round` not accepting inputs `NaN`, `Infinity`, `-Infinity`.
741- Upgraded all dependencies.
742
743
744## 2017-02-16, version 3.9.2
745
746- Fixed #795: Parse error in case of a multi-line expression with just comments.
747
748
749## 2017-02-06, version 3.9.1
750
751- Fixed #789: Math.js not supporting conversion of `string` to `BigNumber`,
752 `Fraction`, or `Complex` number.
753- Fixed #790: Expression parser did not pass function arguments of enclosing
754 functions via `scope` to functions having `rawArgs = true`.
755- Small fixes in the docs. Thanks @HarrySarson.
756
757
758## 2017-01-23, version 3.9.0
759
760- Implemented support for algebra: powerful new functions `simplify` and
761 `derivative`. Thanks @ericman314, @tetslee, and @BigFav.
762- Implemented Kronecker Product `kron`. Thanks @adamisntdead.
763- Reverted `FunctionNode` not accepting a string as function name anymore.
764- Fixed #765: `FunctionAssignmentNode.toString()` returning a string
765 incompatible with the function assignment syntax.
766
767
768## 2016-12-15, version 3.8.1
769
770- Implemented function `mad` (median absolute deviation). Thanks @ruhleder.
771- Fixed #762: expression parser failing to invoke a function returned
772 by a function.
773
774
775## 2016-11-18, version 3.8.0
776
777- Functions `add` and `multiply` now accept more than two arguments. See #739.
778- `OperatorNode` now supports more than two arguments. See #739. Thanks @FSMaxB.
779- Implemented a method `Node.cloneDeep` for the expression nodes. See #745.
780- Fixed a bug in `Node.clone()` not cloning implicit multiplication correctly.
781 Thanks @FSMaxB.
782- Fixed #737: Improved algorithm determining the best prefix for units.
783 It will now retain the original unit like `1 cm` when close enough,
784 instead of returning `10 mm`. Thanks @ericman314.
785- Fixed #732: Allow letter-like unicode characters like Ohm `\u2126`.
786- Fixed #749: Units `rad`, `deg`, and `grad` can now have prefixes like `millirad`.
787- Some fixes in the docs and comments of examples. Thanks @HarrySarson.
788
789
790## 2016-11-05, version 3.7.0
791
792- Implemented method `Node.equals(other)` for all nodes of the expression parser.
793- Implemented BigNumber support in function `arg()`.
794- Command Line Interface loads faster.
795- Implicit conversions between Fractions and BigNumbers throw a neat error now
796 (See #710).
797
798
799## 2016-10-21, version 3.6.0
800
801- Implemented function `erf()`. THanks @patgrasso.
802- Extended function `cross()` to support n-d vectors. Thanks @patgrasso.
803- Extended function `pickRandom` with the option to pick multiple values from
804 an array and give the values weights: `pickRandom(possibles, number, weights)`.
805 Thanks @woylie.
806- Parser now exposes test functions like `isAlpha` which can be replaced in
807 order to adjust the allowed characters in variables names (See #715).
808- Fixed #727: Parser not throwing an error for invalid implicit multiplications
809 like `-2 2` and `2^3 4` (right after the second value of an operator).
810- Fixed #688: Describe allowed variable names in the docs.
811
812
813## 2016-09-21, version 3.5.3
814
815- Some more fixes regarding numbers ending with a decimal mark (like `2.`).
816
817
818## 2016-09-20, version 3.5.2
819
820- Fixed numbers ending with a decimal mark (like `2.`) not being supported by
821 the parser, solved the underlying ambiguity in the parser. See #707, #711.
822
823
824## 2016-09-12, version 3.5.1
825
826- Removed a left over console.log statement. Thanks @eknkc.
827
828
829## 2016-09-07, version 3.5.0
830
831- Comments of expressions are are now stored in the parsed nodes. See #690.
832- Fixed function `print` not accepting an Object with formatting options as
833 third parameter Thanks @ThomasBrierley.
834- Fixed #707: The expression parser no longer accepts numbers ending with a dot
835 like `2.`.
836
837
838## 2016-08-08, version 3.4.1
839
840- Fixed broken bundle files (`dist/math.js`, `dist/math.min.js`).
841- Fixed some layout issues in the function reference docs.
842
843
844## 2016-08-07, version 3.4.0
845
846- Implemented support for custom units using `createUnit`. Thanks @ericman314.
847- Implemented function `splitUnits`. Thanks @ericman314.
848- Implemented function `isPrime`. Thanks @MathBunny.
849
850
851## 2016-07-05, version 3.3.0
852
853- Implemented function `isNaN`.
854- Function `math.filter` now passes three arguments to the callback function:
855 value, index, and array.
856- Removed the check on the number of arguments from functions defined in the
857 expression parser (see #665).
858- Fixed #665: functions `map`, `forEach`, and `filter` now invoke callbacks
859 which are a typed-function with the correct number of arguments.
860
861
862## 2016-04-26, version 3.2.1
863
864- Fixed #651: unable to perform calculations on "Unit-less" units.
865- Fixed matrix.subset mutating the replacement matrix when unsqueezing it.
866
867
868## 2016-04-16, version 3.2.0
869
870- Implemented #644: method `Parser.getAll()` to retrieve all defined variables.
871- Upgraded dependencies (decimal.js@5.0.8, fraction.js@3.3.1,
872 typed-function@0.10.4).
873- Fixed #601: Issue with unnamed typed-functions by upgrading to
874 typed-function v0.10.4.
875- Fixed #636: More strict `toTex` templates, reckon with number of arguments.
876- Fixed #641: Bug in expression parser parsing implicit multiplication with
877 wrong precedence in specific cases.
878- Fixed #645: Added documentation about `engineering` notation of function
879 `math.format`.
880
881
882## 2016-04-03, version 3.1.4
883
884- Using ES6 Math functions like `Math.sinh`, `Math.cbrt`, `Math.sign`, etc when
885 available.
886- Fixed #631: unit aliases `weeks`, `months`, and `years` where missing.
887- Fixed #632: problem with escaped backslashes at the end of strings.
888- Fixed #635: `Node.toString` options where not passed to function arguments.
889- Fixed #629: expression parser throws an error when passing a number with
890 decimal exponent instead of parsing them as implicit multiplication.
891- Fixed #484, #555: inaccuracy of `math.sinh` for values between -1 and 1.
892- Fixed #625: Unit `in` (`inch`) not always working due to ambiguity with
893 the operator `a in b` (alias of `a to b`).
894
895
896## 2016-03-24, version 3.1.3
897
898- Fix broken bundle.
899
900
901## 2016-03-24, version 3.1.2
902
903- Fix broken npm release.
904
905
906## 2016-03-24, version 3.1.1
907
908- Fixed #621: a bug in parsing implicit multiplications like `(2)(3)+4`.
909- Fixed #623: `nthRoot` of zero with a negative root returned `0` instead of
910 `Infinity`.
911- Throw an error when functions `min`, `max`, `mean`, or `median` are invoked
912 with multiple matrices as arguments (see #598).
913
914
915## 2016-03-19, version 3.1.0
916
917- Hide multiplication operator by default when outputting `toTex` and `toString`
918 for implicit multiplications. Implemented and option to output the operator.
919- Implemented unit `kip` and alias `kips`. Thanks @hgupta9.
920- Added support for prefixes for units `mol` and `mole`. Thanks @stu-blair.
921- Restored support for implicit multiplications like `2(3+4)` and `(2+3)(4+5)`.
922- Some improvements in the docs.
923- Added automatic conversions from `boolean` and `null` to `Fraction`,
924 and conversions from `Fraction` to `Complex`.
925
926
927## 2016-03-04, version 3.0.0
928
929### breaking changes
930
931- More restricted support for implicit multiplication in the expression
932 parser: `(...)(...)` is now evaluated as a function invocation,
933 and `[...][...]` as a matrix subset.
934- Matrix multiplication no longer squeezes scalar outputs to a scalar value,
935 but leaves them as they are: a vector or matrix containing a single value.
936 See #529.
937- Assignments in the expression parser now return the assigned value rather
938 than the created or updated object (see #533). Example:
939
940 ```
941 A = eye(3)
942 A[1,1] = 2 # this assignment now returns 2 instead of A
943 ```
944
945- Expression parser now supports objects. This involves a refactoring and
946 extension in expression nodes:
947 - Implemented new node `ObjectNode`.
948 - Refactored `AssignmentNode`, `UpdateNode`, and `IndexNode` are refactored
949 into `AccessorNode`, `AssignmentNode`, and `IndexNode` having a different API.
950- Upgraded the used BigNumber library `decimal.js` to v5. Replaced the
951 trigonometric functions of math.js with those provided in decimal.js v5.
952 This can give slightly different behavior qua round-off errors.
953- Replaced the internal `Complex.js` class with the `complex.js` library
954 created by @infusion.
955- Entries in a matrix (typically numbers, BigNumbers, Units, etc) are now
956 considered immutable, they are no longer copied when performing operations on
957 the entries, improving performance.
958- Implemented nearly equal comparison for relational functions (`equal`,
959 `larger`, `smaller`, etc.) when using BigNumbers.
960- Changed the casing of the configuration options `matrix` (`Array` or `Matrix`)
961 and `number` (`number`, `BigNumber`, `Fraction`) such that they now match
962 the type returned by `math.typeof`. Wrong casing gives a console warning but
963 will still work.
964- Changed the default config value for `epsilon` from `1e-14` to `1e-12`,
965 see #561.
966
967### non-breaking changes
968
969- Extended function `pow` to return the real root for cubic roots of negative
970 numbers. See #525, #482, #567.
971- Implemented support for JSON objects in the expression parser and the
972 function `math.format`.
973- Function `math.fraction` now supports `BigNumber`, and function
974 `math.bignumber` now supports `Fraction`.
975- Expression parser now allows function and/or variable assignments inside
976 accessors and conditionals, like `A[x=2]` or `a > 2 ? b="ok" : b="fail"`.
977- Command line interface:
978 - Outputs the variable name of assignments.
979 - Fixed not rounding BigNumbers to 14 digits like numbers.
980 - Fixed non-working autocompletion of user defined variables.
981- Reorganized and extended docs, added docs on classes and more. Thanks @hgupta9.
982- Added new units `acre`, `hectare`, `torr`, `bar`, `mmHg`, `mmH2O`, `cmH2O`,
983 and added new aliases `acres`, `hectares`, `sqfeet`, `sqyard`, `sqmile`,
984 `sqmiles`, `mmhg`, `mmh2o`, `cmh2o`. Thanks @hgupta9.
985- Fixed a bug in the toString method of an IndexNode.
986- Fixed angle units `deg`, `rad`, `grad`, `cycle`, `arcsec`, and `arcmin` not
987 being defined as BigNumbers when configuring to use BigNumbers.
988
989
990## 2016-02-03, version 2.7.0
991
992- Added more unit aliases for time: `secs`, `mins`, `hr`, `hrs`. See #551.
993- Added support for doing operations with mixed `Fractions` and `BigNumbers`.
994- Fixed #540: `math.intersect()` returning null in some cases. Thanks @void42.
995- Fixed #546: Cannot import BigNumber, Fraction, Matrix, Array.
996 Thanks @brettjurgens.
997
998
999## 2016-01-08, version 2.6.0
1000
1001- Implemented (complex) units `VA` and `VAR`.
1002- Implemented time units for weeks, months, years, decades, centuries, and
1003 millennia. Thanks @owenversteeg.
1004- Implemented new notation `engineering` in function `math.format`.
1005 Thanks @johnmarinelli.
1006- Fixed #523: In some circumstances, matrix subset returned a scalar instead
1007 of the correct subset.
1008- Fixed #536: A bug in an internal method used for sparse matrices.
1009
1010
1011## 2015-12-05, version 2.5.0
1012
1013- Implemented support for numeric types `Fraction` and `BigNumber` in units.
1014- Implemented new method `toNumeric` for units.
1015- Implemented new units `arcsec`, `arcsecond`, `arcmin`, `arcminute`.
1016 Thanks @devdevdata222.
1017- Implemented new unit `Herts` (`Hz`). Thanks @SwamWithTurtles.
1018- Fixed #485: Scoping issue with variables both used globally as well as in a
1019 function definition.
1020- Fixed: Function `number` didn't support `Fraction` as input.
1021
1022
1023## 2015-11-14, version 2.4.2
1024
1025- Fixed #502: Issue with `format` in some JavaScript engines.
1026- Fixed #503: Removed trailing commas and the use of keyword `import` as
1027 property, as this gives issues with old JavaScript engines.
1028
1029
1030## 2015-10-29, version 2.4.1
1031
1032- Fixed #480: `nthRoot` not working on Internet Explorer (up to IE 11).
1033- Fixed #490: `nthRoot` returning an error for negative values like
1034 `nthRoot(-2, 3)`.
1035- Fixed #489: an issue with initializing a sparse matrix without data.
1036 Thanks @Retsam.
1037- Fixed: #493: function `combinations` did not throw an exception for
1038 non-integer values of `k`.
1039- Fixed: function `import` did not override typed functions when the option
1040 override was set true.
1041- Fixed: added functions `math.sparse` and `math.index` to the reference docs,
1042 they where missing.
1043- Fixed: removed memoization from `gamma` and `factorial` functions, this
1044 could blow up memory.
1045
1046
1047## 2015-10-09, version 2.4.0
1048
1049- Added support in the expression parser for mathematical alphanumeric symbols
1050 in the expression parser: unicode range \u{1D400} to \u{1D7FF} excluding
1051 invalid code points.
1052- Extended function `distance` with more signatures. Thanks @kv-kunalvyas.
1053- Fixed a bug in functions `sin` and `cos`, which gave wrong results for
1054 BigNumber integer values around multiples of tau (i.e. `sin(bignumber(7))`).
1055- Fixed value of unit `stone`. Thanks @Esvandiary for finding the error.
1056
1057
1058## 2015-09-19, version 2.3.0
1059
1060- Implemented function `distance`. Thanks @devanp92.
1061- Implemented support for Fractions in function `lcm`. Thanks @infusion.
1062- Implemented function `cbrt` for numbers, complex numbers, BigNumbers, Units.
1063- Implemented function `hypot`.
1064- Upgraded to fraction.js v3.0.0.
1065- Fixed #450: issue with non sorted index in sparse matrices.
1066- Fixed #463, #322: inconsistent handling of implicit multiplication.
1067- Fixed #444: factorial of infinity not returning infinity.
1068
1069
1070## 2015-08-30, version 2.2.0
1071
1072- Units with powers (like `m^2` and `s^-1`) now output with the best prefix.
1073- Implemented support for units to `abs`, `cube`, `sign`, `sqrt`, `square`.
1074 Thanks @ericman314.
1075- Implemented function `catalan` (Combinatorics). Thanks @devanp92.
1076- Improved the `canDefineProperty` check to return false in case of IE8, which
1077 has a broken implementation of `defineProperty`. Thanks @golmansax.
1078- Fixed function `to` not working in case of a simplified unit.
1079- Fixed #437: an issue with row swapping in `lup`, also affecting `lusolve`.
1080
1081
1082## 2015-08-12, version 2.1.1
1083
1084- Fixed wrong values of the physical constants `speedOfLight`, `molarMassC12`,
1085 and `magneticFluxQuantum`. Thanks @ericman314 for finding two of them.
1086
1087
1088## 2015-08-11, version 2.1.0
1089
1090- Implemented derived units (like `110 km/h in m/s`). Thanks @ericman314.
1091- Implemented support for electric units. Thanks @ericman314.
1092- Implemented about 50 physical constants like `speedOfLight`, `gravity`, etc.
1093- Implemented function `kldivergence` (Kullback-Leibler divergence).
1094 Thanks @saromanov.
1095- Implemented function `mode`. Thanks @kv-kunalvyas.
1096- Added support for unicode characters in the expression parser: greek letters
1097 and latin letters with accents. See #265.
1098- Internal functions `Unit.parse` and `Complex.parse` now throw an Error
1099 instead of returning null when passing invalid input.
1100
1101
1102## 2015-07-29, version 2.0.1
1103
1104- Fixed operations with mixed fractions and numbers be converted to numbers
1105 instead of fractions.
1106
1107
1108## 2015-07-28, version 2.0.0
1109
1110- Large internal refactoring:
1111 - performance improvements.
1112 - allows to create custom bundles
1113 - functions are composed using `typed-function` and are extensible
1114- Implemented support for fractions, powered by the library `fraction.js`.
1115- Implemented matrix LU decomposition with partial pivoting and a LU based
1116 linear equations solver (functions `lup` and `lusolve`). Thanks @rjbaucells.
1117- Implemented a new configuration option `predictable`, which can be set to
1118 true in order to ensure predictable function output types.
1119- Implemented function `intersect`. Thanks @kv-kunalvyas.
1120- Implemented support for adding `toTex` properties to custom functions.
1121 Thanks @FSMaxB.
1122- Implemented support for complex values to `nthRoot`. Thanks @gangachris.
1123- Implemented util functions `isInteger`, `isNegative`, `isNumeric`,
1124 `isPositive`, and `isZero`.
1125
1126### breaking changes
1127
1128- String input is now converted to numbers by default for all functions.
1129- Adding two strings will no longer concatenate them, but will convert the
1130 strings to numbers and add them.
1131- Function `index` does no longer accept an array `[start, end, step]`, but
1132 instead accepts an array with arbitrary index values. It also accepts
1133 a `Range` object as input.
1134- Function `typeof` no longer returns lower case names, but now returns lower
1135 case names for primitives (like `number`, `boolean`, `string`), and
1136 upper-camel-case for non-primitives (like `Array`, `Complex`, `Function`).
1137- Function `import` no longer supports a module name as argument. Instead,
1138 modules can be loaded using require: `math.import(require('module-name'))`.
1139- Function `import` has a new option `silent` to ignore errors, and throws
1140 errors on duplicates by default.
1141- Method `Node.compile()` no longer needs `math` to be passed as argument.
1142- Reintroduced method `Node.eval([scope])`.
1143- Function `sum` now returns zero when input is an empty array. Thanks @FSMAxB.
1144- The size of Arrays is no longer validated. Matrices will validate this on
1145 creation.
1146
1147
1148## 2015-07-12, version 1.7.1
1149
1150- Fixed #397: Inaccuracies in nthRoot for very large values, and wrong results
1151 for very small values. (backported from v2)
1152- Fixed #405: Parser throws error when defining a function in a multiline
1153 expression.
1154
1155
1156## 2015-05-31, version 1.7.0
1157
1158- Implemented function `quantileSeq` and `partitionSelect`. Thanks @BigFav.
1159- Implemented functions `stirlingS2`, `bellNumbers`, `composition`, and
1160 `multinomial`. Thanks @devanp92.
1161- Improved the performance of `median` (see #373). Thanks @BigFav.
1162- Extended the command line interface with a `mode` option to output either
1163 the expressions result, string representation, or tex representation.
1164 Thanks @FSMaxB.
1165- Fixed #309: Function median mutating the input matrix. Thanks @FSMaxB.
1166- Fixed `Node.transform` not recursing over replaced parts of the
1167 node tree (see #349).
1168- Fixed #381: issue in docs of `randomInt`.
1169
1170
1171## 2015-04-22, version 1.6.0
1172
1173- Improvements in `toTex`. Thanks @FSMaxB.
1174- Fixed #328: `abs(0 + 0i)` evaluated to `NaN`.
1175- Fixed not being able to override lazy loaded constants.
1176
1177
1178## 2015-04-09, version 1.5.2
1179
1180- Fixed #313: parsed functions did not handle recursive calls correctly.
1181- Fixed #251: binary prefix and SI prefix incorrectly used for byte. Now
1182 following SI standards (`1 KiB == 1024 B`, `1 kB == 1000 B`).
1183- Performance improvements in parsed functions.
1184
1185
1186## 2015-04-08, version 1.5.1
1187
1188- Fixed #316: a bug in rounding values when formatting.
1189- Fixed #317, #319: a bug in formatting negative values.
1190
1191
1192## 2015-03-28, version 1.5.0
1193
1194- Added unit `stone` (6.35 kg).
1195- Implemented support for sparse matrices. Thanks @rjbaucells.
1196- Implemented BigNumber support for function `atan2`. Thanks @BigFav.
1197- Implemented support for custom LaTeX representations. Thanks @FSMaxB.
1198- Improvements and bug fixes in outputting parentheses in `Node.toString` and
1199 `Node.toTex` functions. Thanks @FSMaxB.
1200- Fixed #291: function `format` sometimes returning exponential notation when
1201 it should return a fixed notation.
1202
1203
1204## 2015-02-28, version 1.4.0
1205
1206- Implemented trigonometric functions:
1207 `acosh`, `acoth`, `acsch`, `asech`, `asinh`, `atanh`, `acot`, `acsc`, `asec`.
1208 Thanks @BigFav.
1209- Added BigNumber support for functions: `cot`, `csc`, `sec`, `coth`,
1210 `csch`, `sech`. Thanks @BigFav.
1211- Implemented support for serialization and deserialization of math.js data
1212 types.
1213- Fixed the calculation of `norm()` and `abs()` for large complex numbers.
1214 Thanks @rjbaucells.
1215- Fixed #281: improved formatting complex numbers. Round the real or imaginary
1216 part to zero when the difference is larger than the configured precision.
1217
1218
1219## 2015-02-09, version 1.3.0
1220
1221- Implemented BigNumber implementations of most trigonometric functions: `sin`,
1222 `cos`, `tan`, `asin`, `acos`, `atan`, `cosh`, `sinh`, `tanh`. Thanks @BigFav.
1223- Implemented function `trace`. Thanks @pcorey.
1224- Faster loading of BigNumber configuration with a high precision by lazy
1225 loading constants like `pi` and `e`.
1226- Fixed constants `NaN` and `Infinity` not being BigNumber objects when
1227 BigNumbers are configured.
1228- Fixed missing parentheses in the `toTex` representation of function
1229 `permutations`.
1230- Some minor fixes in the docs. Thanks @KenanY.
1231
1232
1233## 2014-12-25, version 1.2.0
1234
1235- Support for bitwise operations `bitAnd`, `bitNot`, `bitOr`, `bitXor`,
1236 `leftShift`, `rightArithShift`, and `rightLogShift`. Thanks @BigFav.
1237- Support for boolean operations `and`, `not`, `or`, `xor`. Thanks @BigFav.
1238- Support for `gamma` function. Thanks @BigFav.
1239- Converting a unit without value will now result in a unit *with* value,
1240 i.e. `inch in cm` will return `2.54 cm` instead of `cm`.
1241- Improved accuracy of `sinh` and complex `cos` and `sin`. Thanks @pavpanchekha.
1242- Renamed function `select` to `chain`. The old function `select` will remain
1243 functional until math.js v2.0.
1244- Upgraded to decimal.js v4.0.1 (BigNumber library).
1245
1246
1247## 2014-11-22, version 1.1.1
1248
1249- Fixed Unit divided by Number returning zero.
1250- Fixed BigNumber downgrading to Number for a negative base in `pow`.
1251- Fixed some typos in error messaging (thanks @andy0130tw) and docs.
1252
1253
1254## 2014-11-15, version 1.1.0
1255
1256- Implemented functions `dot` (dot product), `cross` (cross product), and
1257 `nthRoot`.
1258- Officially opened up the API of expression trees:
1259 - Documented the API.
1260 - Implemented recursive functions `clone`, `map`, `forEach`, `traverse`,
1261 `transform`, and `filter` for expression trees.
1262 - Parameter `index` in the callbacks of `map` and `forEach` are now cloned
1263 for every callback.
1264 - Some internal refactoring inside nodes to make the API consistent:
1265 - Renamed `params` to `args` and vice versa to make things consistent.
1266 - Renamed `Block.nodes` to `Block.blocks`.
1267 - `FunctionNode` now has a `name: string` instead of a `symbol: SymbolNode`.
1268 - Changed constructor of `RangeNode` to
1269 `new RangeNode(start: Node, end: Node [, step: Node])`.
1270 - Nodes for a `BlockNode` must now be passed via the constructor instead
1271 of via a function `add`.
1272- Fixed `2e` giving a syntax error instead of being parsed as `2 * e`.
1273
1274
1275## 2014-09-12, version 1.0.1
1276
1277- Disabled array notation for ranges in a matrix index in the expression parser
1278 (it is confusing and redundant there).
1279- Fixed a regression in the build of function subset not being able to return
1280 a scalar.
1281- Fixed some missing docs and broken links in the docs.
1282
1283
1284## 2014-09-04, version 1.0.0
1285
1286- Implemented a function `filter(x, test)`.
1287- Removed `math.distribution` for now, needs some rethinking.
1288- `math.number` can convert units to numbers (requires a second argument)
1289- Fixed some precedence issues with the range and conversion operators.
1290- Fixed an zero-based issue when getting a matrix subset using an index
1291 containing a matrix.
1292
1293
1294## 2014-08-21, version 0.27.0
1295
1296- Implemented functions `sort(x [, compare])` and `flatten(x)`.
1297- Implemented support for `null` in all functions.
1298- Implemented support for "rawArgs" functions in the expression parser. Raw
1299 functions are invoked with unevaluated parameters (nodes).
1300- Expressions in the expression parser can now be spread over multiple lines,
1301 like '2 +\n3'.
1302- Changed default value of the option `wrap` of function `math.import` to false.
1303- Changed the default value for new entries in a resized matrix when to zero.
1304 To leave new entries uninitialized, use the new constant `math.uninitialized`
1305 as default value.
1306- Renamed transform property from `__transform__` to `transform`, and documented
1307 the transform feature.
1308- Fixed a bug in `math.import` not applying options when passing a module name.
1309- A returned matrix subset is now only squeezed when the `index` consists of
1310 scalar values, and no longer for ranges resolving into a single value.
1311
1312
1313## 2014-08-03, version 0.26.0
1314
1315- A new instance of math.js can no longer be created like `math([options])`,
1316 to prevent side effects from math being a function instead of an object.
1317 Instead, use the function `math.create([options])` to create a new instance.
1318- Implemented `BigNumber` support for all constants: `pi`, `tau`, `e`, `phi`,
1319 `E`, `LN2`, `LN10`, `LOG2E`, `LOG10E`, `PI`, `SQRT1_2`, and `SQRT2`.
1320- Implemented `BigNumber` support for functions `gcd`, `xgcd`, and `lcm`.
1321- Fixed function `gxcd` returning an Array when math.js was configured
1322 as `{matrix: 'matrix'}`.
1323- Multi-line expressions now return a `ResultSet` instead of an `Array`.
1324- Implemented transforms (used right now to transform one-based indices to
1325 zero-based for expressions).
1326- When used inside the expression parser, functions `concat`, `min`, `max`,
1327 and `mean` expect an one-based dimension number.
1328- Functions `map` and `forEach` invoke the callback with one-based indices
1329 when used from within the expression parser.
1330- When adding or removing dimensions when resizing a matrix, the dimensions
1331 are added/removed from the inner side (right) instead of outer side (left).
1332- Improved index out of range errors.
1333- Fixed function `concat` not accepting a `BigNumber` for parameter `dim`.
1334- Function `squeeze` now squeezes both inner and outer singleton dimensions.
1335- Output of getting a matrix subset is not automatically squeezed anymore
1336 except for scalar output.
1337- Renamed `FunctionNode` to `FunctionAssignmentNode`, and renamed `ParamsNode`
1338 to `FunctionNode` for more clarity.
1339- Fixed broken auto completion in CLI.
1340- Some minor fixes.
1341
1342
1343## 2014-07-01, version 0.25.0
1344
1345- The library now immediately returns a default instance of mathjs, there is
1346 no need to instantiate math.js in a separate step unless one ones to set
1347 configuration options:
1348
1349 // instead of:
1350 var mathjs = require('mathjs'), // load math.js
1351 math = mathjs(); // create an instance
1352
1353 // just do:
1354 var math = require('mathjs');
1355- Implemented support for implicit multiplication, like `math.eval('2a', {a:3})`
1356 and `math.eval('(2+3)(1-3)')`. This changes behavior of matrix indexes as
1357 well: an expression like `[...][...]` is not evaluated as taking a subset of
1358 the first matrix, but as an implicit multiplication of two matrices.
1359- Removed utility function `ifElse`. This function is redundant now the
1360 expression parser has a conditional operator `a ? b : c`.
1361- Fixed a bug with multiplying a number with a temperature,
1362 like `math.eval('10 * celsius')`.
1363- Fixed a bug with symbols having value `undefined` not being evaluated.
1364
1365
1366## 2014-06-20, version 0.24.1
1367
1368- Something went wrong with publishing on npm.
1369
1370
1371## 2014-06-20, version 0.24.0
1372
1373- Added constant `null`.
1374- Functions `equal` and `unequal` support `null` and `undefined` now.
1375- Function `typeof` now recognizes regular expressions as well.
1376- Objects `Complex`, `Unit`, and `Help` now return their string representation
1377 when calling `.valueOf()`.
1378- Changed the default number of significant digits for BigNumbers from 20 to 64.
1379- Changed the behavior of the conditional operator (a ? b : c) to lazy
1380 evaluating.
1381- Fixed imported, wrapped functions not accepting `null` and `undefined` as
1382 function arguments.
1383
1384
1385## 2014-06-10, version 0.23.0
1386
1387- Renamed some functions (everything now has a logical, camel case name):
1388 - Renamed functions `edivide`, `emultiply`, and `epow` to `dotDivide`,
1389 `dotMultiply`, and `dotPow` respectively.
1390 - Renamed functions `smallereq` and `largereq` to `smallerEq` and `largerEq`.
1391 - Renamed function `unary` to `unaryMinus` and added support for strings.
1392- `end` is now a reserved keyword which cannot be used as function or symbol
1393 name in the expression parser, and is not allowed in the scope against which
1394 an expression is evaluated.
1395- Implemented function `unaryPlus` and unary plus operator.
1396- Implemented function `deepEqual` for matrix comparisons.
1397- Added constant `phi`, the golden ratio (`phi = 1.618...`).
1398- Added constant `version`, returning the version number of math.js as string.
1399- Added unit `drop` (`gtt`).
1400- Fixed not being able to load math.js using AMD/require.js.
1401- Changed signature of `math.parse(expr, nodes)` to `math.parse(expr, options)`
1402 where `options: {nodes: Object.<String, Node>}`
1403- Removed matrix support from conditional function `ifElse`.
1404- Removed automatic assignment of expression results to variable `ans`.
1405 This functionality can be restored by pre- or postprocessing every evaluation,
1406 something like:
1407
1408 function evalWithAns (expr, scope) {
1409 var ans = math.eval(expr, scope);
1410 if (scope) {
1411 scope.ans = ans;
1412 }
1413 return ans;
1414 }
1415
1416
1417## 2014-05-22, version 0.22.0
1418
1419- Implemented support to export expressions to LaTeX. Thanks Niels Heisterkamp
1420 (@nheisterkamp).
1421- Output of matrix multiplication is now consistently squeezed.
1422- Added reference documentation in the section /docs/reference.
1423- Fixed a bug in multiplying units without value with a number (like `5 * cm`).
1424- Fixed a bug in multiplying two matrices containing vectors (worked fine for
1425 arrays).
1426- Fixed random functions not accepting Matrix as input, and always returning
1427 a Matrix as output.
1428
1429
1430## 2014-05-13, version 0.21.1
1431
1432- Removed `crypto` library from the bundle.
1433- Deprecated functions `Parser.parse` and `Parser.compile`. Use
1434 `math.parse` and `math.compile` instead.
1435- Fixed function `add` not adding strings and matrices element wise.
1436- Fixed parser not being able to evaluate an exponent followed by a unary minus
1437 like `2^-3`, and a transpose followed by an index like `[3]'[1]`.
1438
1439
1440## 2014-04-24, version 0.21.0
1441
1442- Implemented trigonometric hyperbolic functions `cosh`, `coth`, `csch`,
1443 `sech`, `sinh`, `tanh`. Thanks Rogelio J. Baucells (@rjbaucells).
1444- Added property `type` to all expression nodes in an expression tree.
1445- Fixed functions `log`, `log10`, `pow`, and `sqrt` not supporting complex
1446 results from BigNumber input (like `sqrt(bignumber(-4))`).
1447
1448
1449## 2014-04-16, version 0.20.0
1450
1451- Switched to module `decimal.js` for BigNumber support, instead of
1452 `bignumber.js`.
1453- Implemented support for polar coordinates to the `Complex` datatype.
1454 Thanks Finn Pauls (@finnp).
1455- Implemented BigNumber support for functions `exp`, `log`, and `log10`.
1456- Implemented conditional operator `a ? b : c` in expression parser.
1457- Improved floating point comparison: the functions now check whether values
1458 are nearly equal, against a configured maximum relative difference `epsilon`.
1459 Thanks Rogelio J. Baucells (@rjbaucells).
1460- Implemented function `norm`. Thanks Rogelio J. Baucells (@rjbaucells).
1461- Improved function `ifElse`, is now specified for special data types too.
1462- Improved function `det`. Thanks Bryan Cuccioli (@bcuccioli).
1463- Implemented `BigNumber` support for functions `det` and `diag`.
1464- Added unit alias `lbs` (pound mass).
1465- Changed configuration option `decimals` to `precision` (applies to BigNumbers
1466 only).
1467- Fixed support for element-wise comparisons between a string and a matrix.
1468- Fixed: expression parser now trows IndexErrors with one-based indices instead
1469 of zero-based.
1470- Minor bug fixes.
1471
1472
1473## 2014-03-30, version 0.19.0
1474
1475- Implemented functions `compare`, `sum`, `prod`, `var`, `std`, `median`.
1476- Implemented function `ifElse` Thanks @mtraynham.
1477- Minor bug fixes.
1478
1479
1480## 2014-02-15, version 0.18.1
1481
1482- Added unit `feet`.
1483- Implemented function `compile` (shortcut for parsing and then compiling).
1484- Improved performance of function `pow` for matrices. Thanks @hamadu.
1485- Fixed broken auto completion in the command line interface.
1486- Fixed an error in function `combinations` for large numbers, and
1487 improved performance of both functions `combinations` and `permutations`.
1488
1489
1490## 2014-01-18, version 0.18.0
1491
1492- Changed matrix index notation of expression parser from round brackets to
1493 square brackets, for example `A[1, 1:3]` instead of `A(1, 1:3)`.
1494- Removed need to use the `function` keyword for function assignments in the
1495 expression parser, you can define a function now like `f(x) = x^2`.
1496- Implemented a compilation step in the expression parser: expressions are
1497 compiled into JavaScript, giving much better performance (easily 10x as fast).
1498- Renamed unit conversion function and operator `in` to `to`. Operator `in` is
1499 still available in the expression parser as an alias for `to`. Added unit
1500 `in`, an abbreviation for `inch`. Thanks Elijah Insua (@tmpvar).
1501- Added plurals and aliases for units.
1502- Implemented an argument `includeEnd` for function `range` (false by default).
1503- Ranges in the expression parser now support big numbers.
1504- Implemented functions `permutations` and `combinations`.
1505 Thanks Daniel Levin (@daniel-levin).
1506- Added lower case abbreviation `l` for unit litre.
1507
1508
1509## 2013-12-19, version 0.17.1
1510
1511- Fixed a bug with negative temperatures.
1512- Fixed a bug with prefixes of units squared meter `m2` and cubic meter `m3`.
1513
1514
1515## 2013-12-12, version 0.17.0
1516
1517- Renamed and flattened configuration settings:
1518 - `number.defaultType` is now `number`.
1519 - `number.precision` is now `decimals`.
1520 - `matrix.defaultType` is now `matrix`.
1521- Function `multiply` now consistently outputs a complex number on complex input.
1522- Fixed `mod` and `in` not working as function (only as operator).
1523- Fixed support for old browsers (IE8 and older), compatible when using es5-shim.
1524- Fixed support for Java's ScriptEngine.
1525
1526
1527## 2013-11-28, version 0.16.0
1528
1529- Implemented BigNumber support for arbitrary precision calculations.
1530 Added settings `number.defaultType` and `number.precision` to configure
1531 big numbers.
1532- Documentation is extended.
1533- Removed utility functions `isScalar`, `toScalar`, `isVector`, `toVector`
1534 from `Matrix` and `Range`. Use `math.squeeze` and `math.size` instead.
1535- Implemented functions `get` and `set` on `Matrix`, for easier and faster
1536 retrieval/replacement of elements in a matrix.
1537- Implemented function `resize`, handling matrices, scalars, and strings.
1538- Functions `ones` and `zeros` now return an empty matrix instead of a
1539 number 1 or 0 when no arguments are provided.
1540- Implemented functions `min` and `max` for `Range` and `Index`.
1541- Resizing matrices now leaves new elements undefined by default instead of
1542 filling them with zeros. Function `resize` now has an extra optional
1543 parameter `defaultValue`.
1544- Range operator `:` in expression parser has been given a higher precedence.
1545- Functions don't allow arguments of unknown type anymore.
1546- Options be set when constructing a math.js instance or using the new function
1547 `config(options`. Options are no longer accessible via `math.options`.
1548- Renamed `scientific` notation to `exponential` in function `format`.
1549- Function `format` outputs exponential notation with positive exponents now
1550 always with `+` sign, so outputs `2.1e+3` instead of `2.1e3`.
1551- Fixed function `squeeze` not being able squeeze into a scalar.
1552- Some fixes and performance improvements in the `resize` and `subset`
1553 functions.
1554- Function `size` now adheres to the option `matrix.defaultType` for scalar
1555 input.
1556- Minor bug fixes.
1557
1558
1559## 2013-10-26, version 0.15.0
1560
1561- Math.js must be instantiated now, static calls are no longer supported. Usage:
1562 - node.js: `var math = require('mathjs')();`
1563 - browser: `var math = mathjs();`
1564- Implemented support for multiplying vectors with matrices.
1565- Improved number formatting:
1566 - Function `format` now support various options: precision, different
1567 notations (`fixed`, `scientific`, `auto`), and more.
1568 - Numbers are no longer rounded to 5 digits by default when formatted.
1569 - Implemented a function `format` for `Matrix`, `Complex`, `Unit`, `Range`,
1570 and `Selector` to format using options.
1571 - Function `format` does only stringify values now, and has a new parameter
1572 `precision` to round to a specific number of digits.
1573 - Removed option `math.options.precision`,
1574 use `math.format(value [, precision])` instead.
1575 - Fixed formatting numbers as scientific notation in some cases returning
1576 a zero digit left from the decimal point. (like "0.33333e8" rather than
1577 "3.3333e7"). Thanks @husayt.
1578- Implemented a function `print` to interpolate values in a template string,
1579 this functionality was moved from the function `format`.
1580- Implemented statistics function `mean`. Thanks Guillermo Indalecio Fernandez
1581 (@guillermobox).
1582- Extended and changed `max` and `min` for multi dimensional matrices: they now
1583 return the maximum and minimum of the flattened array. An optional second
1584 argument `dim` allows to calculate the `max` or `min` for specified dimension.
1585- Renamed option `math.options.matrix.default` to
1586 `math.options.matrix.defaultType`.
1587- Removed support for comparing complex numbers in functions `smaller`,
1588 `smallereq`, `larger`, `largereq`. Complex numbers cannot be ordered.
1589
1590
1591## 2013-10-08, version 0.14.0
1592
1593- Introduced an option `math.options.matrix.default` which can have values
1594 `matrix` (default) or `array`. This option is used by the functions `eye`,
1595 `ones`, `range`, and `zeros`, to determine the type of matrix output.
1596- Getting a subset of a matrix will automatically squeeze the resulting subset,
1597 setting a subset of a matrix will automatically unsqueeze the given subset.
1598- Removed concatenation of nested arrays in the expression parser.
1599 You can now input nested arrays like in JavaScript. Matrices can be
1600 concatenated using the function `concat`.
1601- The matrix syntax `[...]` in the expression parser now creates 1 dimensional
1602 matrices by default. `math.eval('[1,2,3,4]')` returns a matrix with
1603 size `[4]`, `math.eval('[1,2;3,4]')` returns a matrix with size `[2,2]`.
1604- Documentation is restructured and extended.
1605- Fixed non working operator `mod` (modulus operator).
1606
1607
1608## 2013-09-03, version 0.13.0
1609
1610- Implemented support for booleans in all relevant functions.
1611- Implemented functions `map` and `forEach`. Thanks Sebastien Piquemal (@sebpic).
1612- All construction functions can be used to convert the type of variables,
1613 also element-wise for all elements in an Array or Matrix.
1614- Changed matrix indexes of the expression parser to one-based with the
1615 upper-bound included, similar to most math applications. Note that on a
1616 JavaScript level, math.js uses zero-based indexes with excluded upper-bound.
1617- Removed support for scalars in the function `subset`, it now only supports
1618 Array, Matrix, and String.
1619- Removed the functions `get` and `set` from a selector, they are a duplicate
1620 of the function `subset`.
1621- Replaced functions `get` and `set` of `Matrix` with a single function
1622 `subset`.
1623- Some moving around with code and namespaces:
1624 - Renamed namespace `math.expr` to `math.expression` (contains Scope, Parser,
1625 node objects).
1626 - Renamed namespace `math.docs` to `math.expression.docs`.
1627 - Moved `math.expr.Selector` to `math.chaining.Selector`.
1628- Fixed some edge cases in functions `lcm` and `xgcd`.
1629
1630
1631## 2013-08-22, version 0.12.1
1632
1633- Fixed outdated version of README.md.
1634- Fixed a broken unit test.
1635
1636
1637## 2013-08-22, version 0.12.0
1638
1639- Implemented functions `random([min, max])`, `randomInt([min, max])`,
1640 `pickRandom(array)`. Thanks Sebastien Piquemal (@sebpic).
1641- Implemented function `distribution(name)`, generating a distribution object
1642 with functions `random`, `randomInt`, `pickRandom` for different
1643 distributions. Currently supporting `uniform` and `normal`.
1644- Changed the behavior of `range` to exclude the upper bound, so `range(1, 4)`
1645 now returns `[1, 2, 3]` instead of `[1, 2, 3, 4]`.
1646- Changed the syntax of `range`, which is now `range(start, end [, step])`
1647 instead of `range(start, [step, ] end)`.
1648- Changed the behavior of `ones` and `zeros` to geometric dimensions, for
1649 example `ones(3)` returns a vector with length 3, filled with ones, and
1650 `ones(3,3)` returns a 2D array with size [3, 3].
1651- Changed the return type of `ones` and `zeros`: they now return an Array when
1652 arguments are Numbers or an Array, and returns a Matrix when the argument
1653 is a Matrix.
1654- Change matrix index notation in parser from round brackets to square brackets,
1655 for example `A[0, 0:3]`.
1656- Removed the feature introduced in v0.10.0 to automatically convert a complex
1657 value with an imaginary part equal to zero to a number.
1658- Fixed zeros being formatted as null. Thanks @TimKraft.
1659
1660
1661## 2013-07-23, version 0.11.1
1662
1663- Fixed missing development dependency
1664
1665
1666## 2013-07-23, version 0.11.0
1667
1668- Changed math.js from one-based to zero-based indexes.
1669 - Getting and setting matrix subset is now zero-based.
1670 - The dimension argument in function `concat` is now zero-based.
1671- Improvements in the string output of function help.
1672- Added constants `true` and `false`.
1673- Added constructor function `boolean`.
1674- Fixed function `select` not accepting `0` as input.
1675 Thanks Elijah Manor (@elijahmanor).
1676- Parser now supports multiple unary minus operators after each other.
1677- Fixed not accepting empty matrices like `[[], []]`.
1678- Some fixes in the end user documentation.
1679
1680
1681## 2013-07-08, version 0.10.0
1682
1683- For complex calculations, all functions now automatically replace results
1684 having an imaginary part of zero with a Number. (`2i * 2i` now returns a
1685 Number `-4` instead of a Complex `-4 + 0i`).
1686- Implemented support for injecting custom node handlers in the parser. Can be
1687 used for example to implement a node handler for plotting a graph.
1688- Implemented end user documentation and a new `help` function.
1689- Functions `size` and `squeeze` now return a Matrix instead of an Array as
1690 output on Matrix input.
1691- Added a constant tau (2 * pi). Thanks Zak Zibrat (@palimpsests).
1692- Renamed function `unaryminus` to `unary`.
1693- Fixed a bug in determining node dependencies in function assignments.
1694
1695
1696## 2013-06-14, version 0.9.1
1697
1698- Implemented element-wise functions and operators: `emultiply` (`x .* y`),
1699 `edivide` (`x ./ y`), `epow` (`x .^ y`).
1700- Added constants `Infinity` and `NaN`.
1701- Removed support for Workspace to keep the library focused on its core task.
1702- Fixed a bug in the Complex constructor, not accepting NaN values.
1703- Fixed division by zero in case of pure complex values.
1704- Fixed a bug in function multiply multiplying a pure complex value with
1705 Infinity.
1706
1707
1708## 2013-05-29, version 0.9.0
1709
1710- Implemented function `math.parse(expr [,scope])`. Optional parameter scope can
1711 be a plain JavaScript Object containing variables.
1712- Extended function `math.expr(expr [, scope])` with an additional parameter
1713 `scope`, similar to `parse`. Example: `math.eval('x^a', {x:3, a:2});`.
1714- Implemented function `subset`, to get or set a subset from a matrix, string,
1715 or other data types.
1716- Implemented construction functions number and string (mainly useful inside
1717 the parser).
1718- Improved function `det`. Thanks Bryan Cuccioli (@bcuccioli).
1719- Moved the parse code from prototype math.expr.Parser to function math.parse,
1720 simplified Parser a little bit.
1721- Strongly simplified the code of Scope and Workspace.
1722- Fixed function mod for negative numerators, and added error messages in case
1723 of wrong input.
1724
1725
1726## 2013-05-18, version 0.8.2
1727
1728- Extended the import function and some other minor improvements.
1729- Fixed a bug in merging one dimensional vectors into a matrix.
1730- Fixed a bug in function subtract, when subtracting a complex number from a
1731 real number.
1732
1733
1734## 2013-05-10, version 0.8.1
1735
1736- Fixed an npm warning when installing mathjs globally.
1737
1738
1739## 2013-05-10, version 0.8.0
1740
1741- Implemented a command line interface. When math.js is installed globally via
1742 npm, the application is available on your system as 'mathjs'.
1743- Implemented `end` keyword for index operator, and added support for implicit
1744 start and end (expressions like `a(2,:)` and `b(2:end,3:end-1)` are supported
1745 now).
1746- Function math.eval is more flexible now: it supports variables and multi-line
1747 expressions.
1748- Removed the read-only option from Parser and Scope.
1749- Fixed non-working unequal operator != in the parser.
1750- Fixed a bug in resizing matrices when replacing a subset.
1751- Fixed a bug in updating a subset of a non-existing variable.
1752- Minor bug fixes.
1753
1754
1755## 2013-05-04, version 0.7.2
1756
1757- Fixed method unequal, which was checking for equality instead of inequality.
1758 Thanks @FJS2.
1759
1760
1761## 2013-04-27, version 0.7.1
1762
1763- Improvements in the parser:
1764 - Added support for chained arguments.
1765 - Added support for chained variable assignments.
1766 - Added a function remove(name) to remove a variable from the parsers scope.
1767 - Renamed nodes for more consistency and to resolve naming conflicts.
1768 - Improved stringification of an expression tree.
1769 - Some simplifications in the code.
1770 - Minor bug fixes.
1771- Fixed a bug in the parser, returning NaN instead of throwing an error for a
1772 number with multiple decimal separators like `2.3.4`.
1773- Fixed a bug in Workspace.insertAfter.
1774- Fixed: math.js now works on IE 6-8 too.
1775
1776
1777## 2013-04-20, version 0.7.0
1778
1779- Implemented method `math.eval`, which uses a readonly parser to evaluate
1780 expressions.
1781- Implemented method `xgcd` (extended eucledian algorithm). Thanks Bart Kiers
1782 (@bkiers).
1783- Improved math.format, which now rounds values to a maximum number of digits
1784 instead of decimals (default is 5 digits, for example `math.format(math.pi)`
1785 returns `3.1416`).
1786- Added examples.
1787- Changed methods square and cube to evaluate matrices element wise (consistent
1788 with all other methods).
1789- Changed second parameter of method import to an object with options.
1790- Fixed method math.typeof on IE.
1791- Minor bug fixes and improvements.
1792
1793
1794## 2013-04-13, version 0.6.0
1795
1796- Implemented chained operations via method math.select(). For example
1797 `math.select(3).add(4).subtract(2).done()` will return `5`.
1798- Implemented methods gcd and lcm.
1799- Implemented method `Unit.in(unit)`, which creates a clone of the unit with a
1800 fixed representation. For example `math.unit('5.08 cm').in('inch')` will
1801 return a unit which string representation always is in inch, thus `2 inch`.
1802 `Unit.in(unit)` is the same as method `math.in(x, unit)`.
1803- Implemented `Unit.toNumber(unit)`, which returns the value of the unit when
1804 represented with given unit. For example
1805 `math.unit('5.08 cm').toNumber('inch')` returns the number `2`, as the
1806 representation of the unit in inches has 2 as value.
1807- Improved: method `math.in(x, unit)` now supports a string as second parameter,
1808 for example `math.in(math.unit('5.08 cm'), 'inch')`.
1809- Split the end user documentation of the parser functions from the source
1810 files.
1811- Removed function help and the built-in documentation from the core library.
1812- Fixed constant i being defined as -1i instead of 1i.
1813- Minor bug fixes.
1814
1815
1816## 2013-04-06, version 0.5.0
1817
1818- Implemented data types Matrix and Range.
1819- Implemented matrix methods clone, concat, det, diag, eye, inv, ones, size,
1820 squeeze, transpose, zeros.
1821- Implemented range operator `:`, and transpose operator `'` in parser.
1822- Changed: created construction methods for easy object creation for all data
1823 types and for the parser. For example, a complex value is now created
1824 with `math.complex(2, 3)` instead of `new math.Complex(2, 3)`, and a parser
1825 is now created with `math.parser()` instead of `new math.parser.Parser()`.
1826- Changed: moved all data types under the namespace math.type, and moved the
1827 Parser, Workspace, etc. under the namespace math.expr.
1828- Changed: changed operator precedence of the power operator:
1829 - it is now right associative instead of left associative like most scripting
1830 languages. So `2^3^4` is now calculated as `2^(3^4)`.
1831 - it has now higher precedence than unary minus most languages, thus `-3^2` is
1832 now calculated as `-(3^2)`.
1833- Changed: renamed the parsers method 'put' into 'set'.
1834- Fixed: method 'in' did not check for units to have the same base.
1835
1836
1837## 2013-03-16, version 0.4.0
1838
1839- Implemented Array support for all methods.
1840- Implemented Array support in the Parser.
1841- Implemented method format.
1842- Implemented parser for units, math.Unit.parse(str).
1843- Improved parser for complex values math.Complex.parse(str);
1844- Improved method help: it now evaluates the examples.
1845- Fixed: a scoping issue with the Parser when defining functions.
1846- Fixed: method 'typeof' was not working well with minified and mangled code.
1847- Fixed: errors in determining the best prefix for a unit.
1848
1849
1850## 2013-03-09, version 0.3.0
1851
1852- Implemented Workspace
1853- Implemented methods cot, csc, sec.
1854- Implemented Array support for methods with one parameter.
1855
1856
1857## 2013-02-25, version 0.2.0
1858
1859- Parser, Scope, and expression tree with Nodes implemented.
1860- Implemented method import which makes it easy to extend math.js.
1861- Implemented methods arg, conj, cube, equal, factorial, im, largereq,
1862 log(x, base), log10, mod, re, sign, smallereq, square, unequal.
1863
1864
1865## 2013-02-18, version 0.1.0
1866
1867- Reached full compatibility with Javascripts built-in Math library.
1868- More functions implemented.
1869- Some bugfixes.
1870
1871
1872## 2013-02-16, version 0.0.2
1873
1874- All constants of Math implemented, plus the imaginary unit i.
1875- Data types Complex and Unit implemented.
1876- First set of functions implemented.
1877
1878
1879## 2013-02-15, version 0.0.1
1880
1881- First publish of the mathjs package. (package is still empty)
1882
\No newline at end of file