UNPKG

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