Rounding

Nearest integer values tying away from zero are calculated using the [ and ] symbols or round function.

[0.5]

round (0.5)

Nearest integer values toward -∞ also known as floor values are calculated using the ⌊ and ⌋ symbols or floor function.

⌊0.5⌋

floor (0.5)

Nearest integer values toward +∞ also known as ceiling values are calculated using the ⌈ and ⌉ symbols or ceil function.

⌈0.5⌉

ceil (0.5)

Nearest integer values toward 0 i.e. the integer components are calculated using int function.

The fractional components are calculated using frac function.

int (0.5)

frac (0.5)