Difference between revisions of "Manuals/calci/ROUNDUP"
Jump to navigation
Jump to search
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | =ROUNDUP(number, | + | <div style="font-size:30px">'''ROUNDUP (number,num_digits)'''</div><br/> |
− | |||
*Where 'number' is the number to round and | *Where 'number' is the number to round and | ||
*'num_of_digits' is the number of digits to which the number is to be rounded. | *'num_of_digits' is the number of digits to which the number is to be rounded. | ||
− | + | **ROUNDUP(), rounds a number up, away from zero. | |
− | ROUNDUP() rounds a number | ||
== Description == | == Description == | ||
Line 10: | Line 8: | ||
ROUNDUP(number, num_of_digits) | ROUNDUP(number, num_of_digits) | ||
− | This function is used to round a number up away from zero, to | + | This function is used to round a number up away from zero, to the number of decimal digits specified in the argument. |
For Example, | For Example, | ||
Line 26: | Line 24: | ||
ROUNDUP() can also be used for multiple number array as - | ROUNDUP() can also be used for multiple number array as - | ||
− | ROUNDUP(2.55..7.55,1) that rounds the numbers | + | ROUNDUP(2.55..7.55,1) that rounds the numbers 2.55 to 7.55 to one decimal place. |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! Number !! ROUNDUP | + | ! Number !! Num_of_digits !! ROUNDUP |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | 2.55 || 1 || 2.6 |
|- | |- | ||
− | | | + | | 3.55 || 1 || 3.6 |
|- | |- | ||
− | | 4. | + | | 4.55 || 1 || 4.6 |
|- | |- | ||
− | | 5 || 5 | + | | 5.55 || 1 || 5.6 |
|- | |- | ||
− | | | + | | 6.55 || 1 || 6.6 |
|- | |- | ||
− | | | + | | 7.55 || 1 || 7.6 |
|- | |- | ||
|} | |} | ||
Line 53: | Line 47: | ||
*ROUNDDOWN() can be used to round a number towards zero. | *ROUNDDOWN() can be used to round a number towards zero. | ||
*MROUND() can be used to round a number to desired multiple. | *MROUND() can be used to round a number to desired multiple. | ||
+ | |||
+ | == Examples == | ||
+ | |||
+ | <div id="6SpaceContent" class="zcontent" align="left"> | ||
+ | |||
+ | {| id="TABLE3" class="SpreadSheet blue" | ||
+ | |- class="even" | ||
+ | | class=" " | '''Function''' | ||
+ | | class=" " | '''Output''' | ||
+ | |||
+ | |- class="odd" | ||
+ | | class="sshl_f" | ROUNDUP(7.6712,2) | ||
+ | | class="sshl_f" | 7.68 | ||
+ | |||
+ | |- class="even" | ||
+ | | class="sshl_f" | ROUNDUP(388.345,0) | ||
+ | | class="sshl_f" | 389 | ||
+ | |||
+ | |- class="odd" | ||
+ | | class="sshl_f" | ROUNDUP(199.37,-1) | ||
+ | | class="sshl_f" | 200 | ||
+ | |||
+ | |- class="even" | ||
+ | | class="sshl_f" | ROUNDUP(-9.95,1) | ||
+ | | class="sshl_f" | -10 | ||
+ | |||
+ | |- class="odd" | ||
+ | | class="sshl_f" | ROUNDUP(-9.95,-1) | ||
+ | | class="sshl_f" | -10 | ||
+ | |} | ||
+ | |||
+ | ==Related Videos== | ||
+ | |||
+ | {{#ev:youtube|_MIn3zFkEcc|280|center|ROUNDING DECIMALS}} | ||
+ | |||
+ | == See Also == | ||
+ | |||
+ | *[[Manuals/calci/ROUNDDOWN | ROUNDDOWN]] | ||
+ | |||
+ | *[[Manuals/calci/ROUND | ROUND]] | ||
+ | |||
+ | *[[Manuals/calci/MROUND | MROUND]] | ||
+ | |||
+ | *[[Manuals/calci/INT | INT]] | ||
+ | |||
+ | *[[Manuals/calci/TRUNC | TRUNC]] | ||
+ | |||
+ | *[[Manuals/calci/CEILING | CEILING]] | ||
+ | |||
+ | *[[Manuals/calci/FLOOR | FLOOR]] | ||
+ | |||
+ | ==References== | ||
+ | |||
+ | *[http://en.wikipedia.org/wiki/Rounding Round Function] | ||
+ | |||
+ | |||
+ | |||
+ | *[[Z_API_Functions | List of Main Z Functions]] | ||
+ | |||
+ | *[[ Z3 | Z3 home ]] |
Latest revision as of 15:35, 21 August 2018
ROUNDUP (number,num_digits)
- Where 'number' is the number to round and
- 'num_of_digits' is the number of digits to which the number is to be rounded.
- ROUNDUP(), rounds a number up, away from zero.
Description
ROUNDUP(number, num_of_digits)
This function is used to round a number up away from zero, to the number of decimal digits specified in the argument.
For Example,
ROUNDUP(67.8,0) returns 68 as a result.
ROUNDUP(6.83112,3) returns 6.832 as a result.
- If 'num_of_digits' is omitted, Calci displays #NaN error message.
- The number is rounded up to the specified number of decimal places, if num_of_digits > 0.
- The number is rounded up to the nearest integer, if num_of_digits = 0.
- The number is rounded up to the left of the decimal point, if num_of_digits < 0.
- If any argument is non-numeric, Calci displays #NaN error message.
ROUNDUP() can also be used for multiple number array as -
ROUNDUP(2.55..7.55,1) that rounds the numbers 2.55 to 7.55 to one decimal place.
Number | Num_of_digits | ROUNDUP |
---|---|---|
2.55 | 1 | 2.6 |
3.55 | 1 | 3.6 |
4.55 | 1 | 4.6 |
5.55 | 1 | 5.6 |
6.55 | 1 | 6.6 |
7.55 | 1 | 7.6 |
- ROUND() can be used to round a number to specified number of digits.
- ROUNDDOWN() can be used to round a number towards zero.
- MROUND() can be used to round a number to desired multiple.
Examples
Function | Output |
ROUNDUP(7.6712,2) | 7.68 |
ROUNDUP(388.345,0) | 389 |
ROUNDUP(199.37,-1) | 200 |
ROUNDUP(-9.95,1) | -10 |
ROUNDUP(-9.95,-1) | -10 |
Related Videos
See Also
References