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