Result modifiers

Function

Description
Abs(x) Returns the absolute value of x:
Abs(-3) =3
Abs(0) = 0
Abs(3) = 3
Ceil(x) Returns the smallest integer not less than x
Eksempler:
Ceil(3.01) = 4
Ceil(3.5) = 4
Ceil (3.99) = 4
Div(x;y) Returns the result of x/y with the
fractional part discarded. (Integer
division)
Examples:
Div(10;3) = 3
Div(-10;3) = -3
Div (-10;-3) = 3
Floor(x) Returns the largest integer not greater
than x
Examples:
Floor(3.01) = 3
Floor(3.5) =3
Floor(3.99) =3
Int(x) Returns the integer part of x.
Examples:
Int(3.25) =3
Int(-3.25) = -3
Mod(x;y) Returns the remainder of x/y
Examples:
Mod(7;3) = 1
Mod(-7;3) = -1
Round(x;y)

Rounds the number x with y numbers of
decimals (if y is negative the integer part
of a number is rounded)
Examples:
Round(7.21;1) = 7.2
Round(7.125;2) = 7.13
Round(133;-1) = 130

Notice: x (and y) references can be full expressions e.g.: 


round((sum(d-1, 0, m1) - sum(d-2, 0, m1));-3) 

Calculates growth between 2 last columns and rounds to the nearest thousands)

Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.