numeric

numeric(x)

Try it yourself:

See also:

numeric(): evaluate an expression numerically

numeric(expr) evaluates or converts an expression into a numeric result where possible. It is useful after symbolic work when you need a decimal approximation.

Exact and approximate results

Numeric evaluation may turn fractions, constants, or symbolic formulas into floating-point values. For example, an expression containing π can be approximated for a chart or measurement, but its exact form may be preferable for algebra.

Related tools

Use simplify() before approximation, format() to control output, and round() only for presentation. isFinite() checks the result and parse() helps turn expression text into a calculation.

Caveat

Approximation can lose precision. Retain the original exact expression when subsequent work depends on cancellation or equality.

All functions