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 usingvpa. For details, seeIncrease Precision of Numeric Calculations. To understand when to use symbolic, variable-precision, or double-precision arithmetic, seeChoose Numeric or Symbolic Arithmetic. The Symbolic Math Toolbox also provides functions for rounding operations and for working with complex numbers.

Functions

expand all

digits Change variable precision used
double Convert symbolic values toMATLABdouble precision
vpa Variable-precision arithmetic (arbitrary-precision arithmetic)
vpaintegral Numerical integration using variable precision
vpasolve Solve equations numerically
vpasum Numerical summation using variable precision
imag Imaginary part of complex number
real Real part of complex number
dec2bin Convert decimal number to character vector representing binary number
dec2hex Convert decimal number to character vector representing hexadecimal number

Topics