Answers for "ceil"

4

ceil and floor

Examples of Floor:
=====================
Input : 2.5
Output : 2

Input : -2.1
Output : -3

Input : 2.9
Output : 2

===============================

Examples of Ceil:
=====================
Input : 2.5
Output : 3

Input : -2.1
Output : -2

Input : 2.9
Output : 3
Posted by: Guest on November-18-2020
2

round up built in function php

echo ceil(0.5); //Prints 1
Posted by: Guest on March-03-2020
6

js ceil

Math.ceil(1.2);
// 2
Posted by: Guest on May-07-2020
1

php round up

<?php
echo 'Rounding modes with 9.5' . PHP_EOL;
var_dump(round(9.5, 0, PHP_ROUND_HALF_UP));
var_dump(round(9.5, 0, PHP_ROUND_HALF_DOWN));
var_dump(round(9.5, 0, PHP_ROUND_HALF_EVEN));
var_dump(round(9.5, 0, PHP_ROUND_HALF_ODD));

echo 'Rounding modes with 8.5' . PHP_EOL;
var_dump(round(8.5, 0, PHP_ROUND_HALF_UP));
var_dump(round(8.5, 0, PHP_ROUND_HALF_DOWN));
var_dump(round(8.5, 0, PHP_ROUND_HALF_EVEN));
var_dump(round(8.5, 0, PHP_ROUND_HALF_ODD));
?>
Posted by: Guest on June-11-2020
0

javascript math ceiling function

Math.ceil()
Posted by: Guest on July-20-2020
0

ceil

ceil ( float $value ) : float
Returns the next highest integer value by rounding up value if necessary.
Posted by: Guest on April-21-2020

Browse Popular Code Answers by Language