Skip to content

single

Convert to single-precision floating-point.

S = single(X)

Returns X converted to single (32-bit IEEE-754). Half the storage and throughput of double on modern CPUs but with reduced precision (~7 decimal digits vs ~15).

single(pi) % 3.1415927 (single precision)
  • double — Convert to double-precision floating-point.
  • cast — Convert an array to a different element type.