UNPKG

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