Type Conversion (8)

Convert a value into a specific numeric or container type.

bignumber
Convert to an arbitrary-precision BigNumber
Syntax
bignumber(x)
boolean
Convert to a boolean
Syntax
boolean(x)
complex
Convert to / construct a Complex
Syntax
complex(re[, im])
fraction
Convert to an exact Fraction
Syntax
fraction(x)
matrix
Convert to a dense DenseMatrix
Syntax
matrix(data)
numeric
Convert to a numeric type
Syntax
numeric(x, type)
parseNumberWithConfig
Listed in the export index; see the source for details.
Syntax
parseNumberWithConfig(…)
sparse
Convert to a SparseMatrix (CSC storage)
Syntax
sparse(data)