Terminal emulator with all the bells and whistles https://www.enlightenment.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
308 B

// DIV_ROUND_UP
@@
expression n, d;
@@
(
- (((n + d) - 1) / d)
+ DIV_ROUND_UP(n, d)
|
- ((n + (d - 1)) / d)
+ DIV_ROUND_UP(n, d)
)
// ROUND_UP
@@
expression n, d;
@@
(
- ((((n + d) - 1) / d) * d)
+ ROUND_UP(n, d)
|
- (((n + (d - 1)) / d) * d)
+ ROUND_UP(n, d)
|
- (DIV_ROUND_UP(n,d) * d)
+ ROUND_UP(n, d)
)