Changelog
2014-05-13, version 0.21.1
crypto
library from the bundle.Parser.parse
and Parser.compile
. Use
math.parse
and math.compile
instead.add
not adding strings and matrices element wise.2^-3
, and a transpose followed by an index like [3]'[1]
.Changelog
2014-04-24, version 0.21.0
cosh
, coth
, csch
,
sech
, sinh
, tanh
. Thanks Rogelio J. Baucells (@rjbaucells).type
to all expression nodes in an expression tree.log
, log10
, pow
, and sqrt
not supporting complex
results from BigNumber input (like sqrt(bignumber(-4))
).Changelog
2014-04-16, version 0.20.0
decimal.js
for BigNumber support, instead of
bignumber.js
.Complex
datatype.
Thanks Finn Pauls (@finnp).exp
, log
, and log10
.a ? b : c
in expression parser.epsilon
.
Thanks Rogelio J. Baucells (@rjbaucells).norm
. Thanks Rogelio J. Baucells (@rjbaucells).ifElse
, is now specified for special data types too.det
. Thanks Bryan Cuccioli (@bcuccioli).BigNumber
support for functions det
and diag
.lbs
(pound mass).decimals
to precision
(applies to BigNumbers
only).Changelog
2014-03-30, version 0.19.0
compare
, sum
, prod
, var
, std
, median
.ifElse
Thanks @mtraynham.Changelog
2014-02-15, version 0.18.1
feet
.compile
(shortcut for parsing and then compiling).pow
for matrices. Thanks @hamadu.combinations
for large numbers, and
improved performance of both functions combinations
and permutations
.Changelog
2014-01-18, version 0.18.0
A[1, 1:3]
instead of A(1, 1:3)
.function
keyword for function assignments in the
expression parser, you can define a function now like f(x) = x^2
.in
to to
. Operator in
is
still available in the expression parser as an alias for to
. Added unit
in
, an abbreviation for inch
. Thanks Elijah Insua (@tmpvar).includeEnd
for function range
(false by default).permutations
and combinations
.
Thanks Daniel Levin (@daniel-levin).l
for unit litre.Changelog
2013-12-19, version 0.17.1
m2
and cubic meter m3
.Changelog
2013-12-12, version 0.17.0
number.defaultType
is now number
.number.precision
is now decimals
.matrix.defaultType
is now matrix
.multiply
now consistently outputs a complex number on complex input.mod
and in
not working as function (only as operator).Changelog
2013-11-28, version 0.16.0
number.defaultType
and number.precision
to configure
big numbers.isScalar
, toScalar
, isVector
, toVector
from Matrix
and Range
. Use math.squeeze
and math.size
instead.get
and set
on Matrix
, for easier and faster
retrieval/replacement of elements in a matrix.resize
, handling matrices, scalars, and strings.ones
and zeros
now return an empty matrix instead of a
number 1 or 0 when no arguments are provided.min
and max
for Range
and Index
.resize
now has an extra optional
parameter defaultValue
.:
in expression parser has been given a higher precedence.config(options
. Options are no longer accessible via math.options
.scientific
notation to exponential
in function format
.format
outputs exponential notation with positive exponents now
always with +
sign, so outputs 2.1e+3
instead of 2.1e3
.squeeze
not being able squeeze into a scalar.resize
and subset
functions.size
now adheres to the option matrix.defaultType
for scalar
input.Changelog
2013-10-26, version 0.15.0
var math = require('mathjs')();
var math = mathjs();
format
now support various options: precision, different
notations (fixed
, scientific
, auto
), and more.format
for Matrix
, Complex
, Unit
, Range
,
and Selector
to format using options.format
does only stringify values now, and has a new parameter
precision
to round to a specific number of digits.math.options.precision
,
use math.format(value [, precision])
instead.print
to interpolate values in a template string,
this functionality was moved from the function format
.mean
. Thanks Guillermo Indalecio Fernandez
(@guillermobox).max
and min
for multi dimensional matrices: they now
return the maximum and minimum of the flattened array. An optional second
argument dim
allows to calculate the max
or min
for specified dimension.math.options.matrix.default
to
math.options.matrix.defaultType
.smaller
,
smallereq
, larger
, largereq
. Complex numbers cannot be ordered.