UNPKG

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