Ceiling: ceil
Syntax
ceil ( op )
Input parameters
op |
the operand |
Examples of valid syntaxes
ceil ( DS_1 )
ceil ( 3.14159 )
Semantics for scalar operations
The operator ceil returns the smallest integer greater than or equal to op. For example:
ceil( 3.14159 )
gives 4
ceil( 15 )
gives 15
ceil( -3.1415 )
gives -3
ceil( -0.1415 )
gives 0
Input parameters type
op
dataset { measure<number> _+ }
| component<number>
| number
Result type
result
dataset { measure<integer> _+ }
| component<integer>
| integer
Additional Constraints
None.
Behaviour
The operator has the behaviour of the “Operators applicable on one Scalar Value or Data Set or Data Set Component” (see the section “Typical behaviours of the ML Operators”).
Examples
Given the operand dataset DS_1:
Input DS_1 (see structure)
Id_1 |
Id_2 |
Me_1 |
Me_2 |
---|---|---|---|
10 |
A |
7.0 |
5.9 |
10 |
B |
0.1 |
-5.0 |
11 |
A |
-32.2 |
17.7 |
11 |
B |
44.5 |
-0.3 |
Example 1
DS_r := ceil (DS_1);
results in (see structure):
Id_1 |
Id_2 |
Me_1 |
Me_2 |
---|---|---|---|
10 |
A |
7 |
6 |
10 |
B |
1 |
-5 |
11 |
A |
-32 |
18 |
11 |
B |
45 |
0 |
Example 2
DS_r := DS_1 [ calc Me_10 := ceil (Me_1) ];
results in (see structure):
Id_1 |
Id_2 |
Me_1 |
Me_2 |
Me_10 |
---|---|---|---|---|
10 |
A |
7.0 |
5.9 |
7 |
10 |
B |
0.1 |
-5.0 |
1 |
11 |
A |
-32.2 |
17.7 |
-32 |
11 |
B |
44.5 |
-0.3 |
45 |