All Versions
243
Latest Version
Avg Release Cycle
27 days
Latest Release
849 days ago
Changelog History
Page 8
Changelog History
Page 8
-
v6.2.3 Changes
October 06, 2019- ๐ Fixed #1640: function
mean
not working for units. Thanks @clintonc. - ๐ Fixed #1639: function
min
listed twice in the "See also" section of the embedded docs of functionstd
. - ๐ Improved performance of
isPrime
, see #1641. Thanks @arguiot.
- ๐ Fixed #1640: function
-
v6.2.2 Changes
September 23, 2019- ๐ Fixed methods
map
andclone
not copying thedotNotation
property ofIndexNode
. Thanks @rianmcguire. - ๐ Fixed a typo in the documentation of
toHTML
. Thanks @maytanthegeek. - ๐ Fixed #1615: error in the docs of
isNumeric
. - ๐ Fixed #1628: Cannot call methods on empty strings or numbers with value
0
.
- ๐ Fixed methods
-
v6.2.1 Changes
August 31, 2019- ๐ Fixed #1606: function
format
not working for expressions.
- ๐ Fixed #1606: function
-
v6.2.0 Changes
August 28, 2019- ๐ Improved performance of
combinationsWithRep
. Thanks @waseemyusuf. - โ Add unit aliases
bit
andbyte
. - ๐ Fix docs referring to
bit
andbyte
instead ofbits
andbytes
. - โก๏ธ Updated dependency
[email protected]
.
- ๐ Improved performance of
-
v6.1.0 Changes
August 17, 2019- ๐ Implemented function
combinationsWithRep
(see #1329). Thanks @waseemyusuf.
- ๐ Implemented function
-
v6.0.4 Changes
August 05, 2019- ๐ Fixed #1554, #1565: ES Modules where not transpiled to ES5, giving issues on old browsers. Thanks @mockdeep for helping to find a solution.
-
v6.0.3 Changes
July 07, 2019- โ Add
unpkg
andjsdelivr
fields in package.json pointing to UMD build. Thanks @tmcw. - ๐ Fix #1550: nested user defined function not receiving variables of an outer user defined function.
- โ Add
-
v6.0.2 Changes
June 11, 2019- ๐ Fix not being able to set configuration after disabling function
import
(regression since v6.0.0).
- ๐ Fix not being able to set configuration after disabling function
-
v6.0.1 Changes
June 09, 2019- ๐ Fix function reference not published in npm library.
- ๐ Fix function
evaluate
andparse
missing in generated docs.
-
v6.0.0 Changes
June 08, 2019!!! BE CAREFUL: BREAKING CHANGES !!!
Most notable changes
Full support for ES6 modules. Support for tree-shaking out of the box.
Load all functions:
import * as math from 'mathjs'
Use a few functions:
import { add, multiply } from 'mathjs'
Load all functions with custom configuration:
import { create, all } from 'mathjs' const config = { number: 'BigNumber' } const math = create(all, config)
Load a few functions with custom configuration:
import { create, addDependencies, multiplyDependencies } from 'mathjs' const config = { number: 'BigNumber' } const { add, multiply } = create({ addDependencies, multiplyDependencies }, config)
Support for lightweight, number-only implementations of all functions:
import { add, multiply } from 'mathjs/number'
New dependency injection solution used under the hood.
๐ฅ Breaking changes
๐ Node 6 is no longer supported.
Functions
config
andimport
are not available anymore in the global context:
// v5 import * as mathjs from 'mathjs' mathjs.config(...) // error in v6.0.0 mathjs.import(...) // error in v6.0.0
Instead, create your own mathjs instance and pass config and imports there:
// v6 import { create, all } from 'mathjs' const config = { number: 'BigNumber' } const mathjs = create(all, config) mathjs.import(...)
- ๐ Renamed function
typeof
totypeOf
,var
tovariance
, andeval
toevaluate
. (the old function names are reserved keywords which can not be used as a variable name). - ๐ Deprecated the
Matrix.storage
function. Usemath.matrix
instead to create a matrix. - ๐ Deprecated function
math.expression.parse
, usemath.parse
instead. Was used before for example to customize supported characters by replacingmath.parse.isAlpha
. - ๐ Moved all classes like
math.type.Unit
andmath.expression.Parser
tomath.Unit
andmath.Parser
respectively. - ๐ Fixed #1428: transform iterating over replaced nodes. New behavior is that it stops iterating when a node is replaced.
- โฌ๏ธ Dropped support for renaming factory functions when importing them.
- โฌ๏ธ Dropped fake BigNumber support of function
erf
. - โ Removed all index.js files used to load specific functions instead of all, like:
// v5 // ... set up empty instance of mathjs, then load a set of functions: math.import(require('mathjs/lib/function/arithmetic'))
Individual functions are now loaded simply like:
// v6 import { add, multiply } from 'mathjs'
To set a specific configuration on the functions:
// v6 import { create, addDependencies, multiplyDependencies } from 'mathjs' const config = { number: 'BigNumber' } const math = create({ addDependencies, multiplyDependencies }, config)
See example
advanced/custom_loading.js
.- โก๏ธ Updated the values of all physical units to their latest official values. See #1529. Thanks @ericman314.
Non breaking changes
- ๐ Implemented units
t
,tonne
,bel
,decibel
,dB
, and prefixes forcandela
. Thanks @mcvladthegoat. - ๐ Fixed
epsilon
setting being applied globally to Complex numbers. - ๐ Fix
math.simplify('add(2, 3)')
throwing an error. - ๐ Fix #1530: number formatting first applied
lowerExp
andupperExp
and after that rounded the value instead of the other way around. - ๐ Fix #1473: remove
'use strict'
in every file, not needed anymore.