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