UNPKG

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