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