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