RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

RunMat™ is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

LicensePrivacy
/
See all docs
Builtin Reference
    • digits
    • int
    • limit
    • piecewise
    • sym
    • syms
    • vpa

vpa — Evaluate scalar symbolic or numeric input as a symbolic decimal.

vpa(x) converts a scalar symbolic or numeric input to a scalar symbolic decimal literal using the current digits setting. vpa(x, d) uses d significant decimal digits. Exact symbolic rationals are expanded exactly; ordinary numeric inputs are rendered from the numeric value supplied by the script.

Syntax

S = vpa(x)
S = vpa(x, d)

Inputs

NameTypeRequiredDefaultDescription
xAnyYes—Scalar symbolic or numeric input.
dNumericScalarNodigitsNumber of significant decimal digits.

Returns

NameTypeDescription
SAnyScalar symbolic variable-precision value or expression.

Errors

IdentifierWhenMessage
RunMat:vpa:ArgCountMore than one optional precision argument is supplied.vpa: too many input arguments
RunMat:vpa:InvalidInputInput cannot be represented as a scalar symbolic expression.vpa: expected a scalar symbolic, numeric, logical, or numeric text input
RunMat:vpa:InvalidDigitsThe requested precision is not an integer in the supported range.vpa: expected a positive integer digit count

How vpa works

  • The default precision is controlled by digits and starts at 32 significant digits.
  • Exact rational symbolic inputs such as sym('1/3') are expanded and rounded with the requested significant digits.
  • Numeric scalar inputs are converted to symbolic decimal literals from their existing numeric value at the requested display precision.
  • Scalar values from every integer class are lifted directly into exact arbitrary-precision integer storage, including int64 and uint64 extrema.
  • Integer precision controls are decoded exactly; noninteger floating controls are rounded to the nearest integer before the supported range is checked.
  • Nonconstant symbolic variables remain symbolic.
  • RunMat currently represents scalar symbolic expressions; array-valued symbolic containers and the documented BoostPrecision option are not implemented.

Examples

Render numeric pi at 50 digits

vpa(pi, 50)

Expected output:

3.141592653589793...

Evaluate an exact rational

vpa(sym('1/3'), 20)

Expected output:

0.33333333333333333333

Using vpa with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how vpa changes the result.

Run a small vpa example, explain the result, then change one input and compare the output.

FAQ

Does vpa return a double?⌄

No. It returns a scalar symbolic value so formatting and downstream symbolic operations can preserve the decimal literal.

Related Math functions

Symbolic

digits · int · limit · piecewise · sym · syms

Elementwise

abs · angle · bsxfun · complex · conj · double · erf · erfcinv · exp · expm1 · factorial · flintmax · gamma · gammaln · heaviside · hypot · idivide · imag · intmax · intmin · ldivide · log · log10 · log1p · log2 · minus · nextpow2 · plus · pow2 · power · rdivide · real · realmax · realmin · realsqrt · rescale · sign · single · sqrt · swapbytes · times · typecast · uint16 · uint32 · uint8

Trigonometry

acos · acosh · asin · asinh · atan · atan2 · atanh · cos · cosd · cosh · cospi · deg2rad · pol2cart · rad2deg · sin · sind · sinh · sinpi · tan · tand · tanh

Reduction

all · any · bounds · cummax · cummin · cumprod · cumsum · cumtrapz · diff · gradient · max · maxk · mean · median · min · mink · movmax · movmean · movmedian · movmin · movprod · movstd · movsum · movvar · nnz · prod · rms · std · sum · trapz · var

Structure

bandwidth · isdiag · ishermitian · issymmetric · istril · istriu · symrcm

Signal

blackman · butter · buttord · cheb2ord · conv · conv2 · deconv · downsample · envelope · filter · filtfilt · fir1 · freqz · gauspuls · hamming · hann · hilbert · periodogram · pulstran · pwelch · rectpuls · resample · sawtooth · sinc · spectrogram · square · tripuls · unwrap · upsample · zplane

Rounding

ceil · fix · floor · mod · rem · round

Factor

chol · decomposition · eig · eigs · lu · qr · svd

Solve

cond · det · inv · linsolve · norm · null · pinv · rank · rcond · rref · vecnorm

Optim

coneprog · fminbnd · fminunc · fsolve · fzero · integral · linprog · lsqcurvefit · lsqnonlin · optimoptions · optimset · quad · secondordercone

Ops

cross · ctranspose · dot · mldivide · mpower · mrdivide · mtimes · pagemtimes · pagetranspose · trace · transpose

Fft

fft · fft2 · fftn · fftshift · ifft · ifft2 · ifftn · ifftshift

Interpolation

griddedInterpolant · interp1 · interp1q · interp2 · pchip · ppval · spline

Discrete

lcm · primes

Ode

ode15s · ode23 · ode45

Poly

polyder · polyfit · polyint · polyval · roots

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how vpa is executed, line by line, in Rust.

  • View the source for vpa in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • How vpa works
  • Examples
  • Render numeric pi at 50 digits
  • Evaluate an exact rational
  • Using vpa with coding agents
  • FAQ
  • Related Math functions
  • Symbolic
  • Elementwise
  • Trigonometry
  • Reduction
  • Structure
  • Signal
  • Rounding
  • Factor
  • Solve
  • Optim
  • Ops
  • Fft
  • Interpolation
  • Discrete
  • Ode
  • Poly
  • Open-source implementation
  • About RunMat