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