Mathcad rounding syntax

The Mathcad notation or Mathcad syntax is used to enter formulas and commands for Mathcad, a commercial mathematical software.
Numbers
Rounding functions
Several functions are available for rounding fractional numeric values to integral values or specific number of fraction digits:
*<code>round(z,n)</code>: returns z rounded to n (optional) decimal places. If n is omitted, returns z rounded to the nearest integer (n is assumed to be zero). If n<0, returns z rounded to n places to the left of the decimal point. For example,
::<code>round(π-2πi)</code> returns 3-6i
::<code>round(-(π-2πi))</code> returns -3+6i.
*<code>trunc(z)</code>: returns the integer part of z by removing the fractional part. For example,
::<code>trunc(2.7)</code> returns 2
::<code>trunc(-2.2)</code> returns -2
*<code>floor(z)</code>: returns the greatest integer ≤ z
::<code>floor(π-2πi)</code> returns 3-7i
::<code>floor(-(π-2πi))</code> returns -4+6i
*<code>ceil(z)</code>: returns the smallest integer ≥ z
::<code>ceil(π-2πi)</code> returns 4-6i
::<code>ceil(-(π-2πi))</code> returns -3+7i
 
< Prev   Next >