UNPKG

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