Main Content

Numbers and Precision

Variable-precision arithmetic and elementary number-theoretic operations

The Symbolic Math Toolbox™ can perform numeric calculations with variable precision by using vpa. For details, see Increase Precision of Numeric Calculations. To understand when to use symbolic, variable-precision, or double-precision arithmetic, see Choose Numeric or Symbolic Arithmetic. The Symbolic Math Toolbox also provides functions for rounding operations and for working with complex numbers.

Functions

expand all

digitsChange variable precision used
doubleConvert symbolic values to MATLAB double precision
vpaVariable-precision arithmetic (arbitrary-precision arithmetic)
vpaintegralNumerical integration using variable precision
vpasolveSolve symbolic equations numerically
vpasumNumerical summation using variable precision (Since R2020b)
imagImaginary part of complex number
realReal part of complex number
dec2binConvert symbolic integer in decimal to binary representation
dec2hexConvert symbolic integer in decimal to hexadecimal representation

Topics

Featured Examples