Removes the fractional part of the argument.
The trunc
function returns the integer part of z
.
The function removes the decimal part of z
, i.e. rounds against zero.
z
may be any numeric expression that evaluates to a real number or a complex number.
If z
is a complex number, the function returns trunc(re(z))+trunc(im(z))i.
Returns the fractional part of the argument.
The fract
function returns the fractional part of z
.
The function removes the integer part of z
, i.e. fract(z) = z - trunc(z).
z
may be any numeric expression that evaluates to a real number or a complex number.
If z
is a complex number, the function returns fract(re(z))+fract(im(z))i.
Rounds the argument up.
The ceil
function finds the smallest integer not less than z
.
z
may be any numeric expression that evaluates to a real number or a complex number.
If z
is a complex number, the function returns ceil(re(z))+ceil(im(z))i.
Rounds the argument down.
The floor
function, which is also called the greatest integer function, gives the largest integer not greater than z
.
z
may be any numeric expression that evaluates to a real number or a complex number.
If z
is a complex number, the function returns floor(re(z))+floor(im(z))i.
Rounds a number to the specified number of decimals.
The round
function rounds z
to the number of decimals given by n
.
z
may be any numeric expression that evaluates to a real number or a complex number.
If z
is a complex number, the function returns round(re(z),n)+round(im(z),n)i.
n
may be any numeric expression that evaluates to an integer.
If n
<0, z
is rounded to n
places to the left of the decimal point.
round(412.4572,3) = 412.457 |
round(412.4572,2) = 412.46 |
round(412.4572,1) = 412.5 |
round(412.4572,0) = 412 |
round(412.4572,-2) = 400 |