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