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