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(&pi;-2&pi;i)</code> returns 3-6i
::<code>round(-(&pi;-2&pi;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(&pi;-2&pi;i)</code> returns 3-7i
::<code>floor(-(&pi;-2&pi;i))</code> returns -4+6i
*<code>ceil(z)</code>: returns the smallest integer ≥ z
::<code>ceil(&pi;-2&pi;i)</code> returns 4-6i
::<code>ceil(-(&pi;-2&pi;i))</code> returns -3+7i

Comments