Difference between revisions of "Manuals/calci/CEILING"

From ZCubes Wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=CEILING(number, significance)=
+
<div style="font-size:30px">'''CEILING (Number,Significance) '''</div><br/>
  
*Where 'number' is the numeric value to round and  
+
*Where 'Number' is the numeric value to round and  
*'significance' is the multiple to round the number.
+
*'Significance' is the multiple to round the number.
 
+
**CEILING() rounds the number up, away from zero, to its nearest multiple of significance.
CEILING() rounds the number down towards zero, to its nearest multiple of significance.
 
  
 
== Description ==
 
== Description ==
  
CEILING(number, significance)
+
CEILING(Number, Significance)
  
 
For Example,
 
For Example,
  
CEILING(3.5, 2) ''returns 2''.
+
CEILING(3.5, 2) ''returns 4''.
  
CEILING(-4.6, -2) ''returns -4''.
+
CEILING(-4.6, -2) ''returns -6''.
  
 
*Calci returns an NaN error message if the argument is nonnumeric.  
 
*Calci returns an NaN error message if the argument is nonnumeric.  
Line 22: Line 21:
 
*This function can also be used for array of numbers in form of equation as-
 
*This function can also be used for array of numbers in form of equation as-
  
   a) CEILING(3.33..6.33,0.1) where x varies from 3.33 to 6.33 and displays output to multiples of 0.1. ''Displays 3.3,4.3,5.3,6.3'' as output.
+
   a) CEILING(3.33..6.33,0.1) where x varies from 3.33 to 6.33 and displays output to multiples of 0.1. ''Displays 3.4,4.4,5.4,6.4'' as output.
  
   b) 2.5..4.5|CEILING(x+2,2)| where x varies from 2.5 to 4.5 , adds value 2 and displays output to multiples of 2. ''Displays 4,4,6'' as output.  
+
   b) 2.5..4.5|CEILING(x+2,2)| where x varies from 2.5 to 4.5 , adds value 2 and displays output to multiples of 2. ''Displays 6,6,8'' as output.  
  
 
== Examples ==
 
== Examples ==
Line 35: Line 34:
 
| class="  " | '''Output'''
 
| class="  " | '''Output'''
 
|- class="odd"
 
|- class="odd"
| class="sshl_f" |CEILING(55.55,5)
+
| class="sshl_f" |CEILING(67.5,5)
| class="sshl_f" |55
+
| class="sshl_f" |70
 
|- class="even"
 
|- class="even"
 
| class="sshl_f" |CEILING(1000.34,3)
 
| class="sshl_f" |CEILING(1000.34,3)
| class="sshl_f" |999
+
| class="sshl_f" |1002
 
|- class="odd"
 
|- class="odd"
 
| class="sshl_f" |CEILING(22.3)
 
| class="sshl_f" |CEILING(22.3)
| class="sshl_f" |22
+
| class="sshl_f" |23
 
|- class="even"
 
|- class="even"
| class="sshl_f" |CEILING(-143.56,-1)
+
| class="sshl_f" |CEILING(-89.45,-2)
| class="sshl_f" |-143
+
| class="sshl_f" |-90
 
|}
 
|}
 +
 +
==Related Videos==
 +
 +
{{#ev:youtube|2kQZ_i3VGn0|280|center|CEILING}}
  
 
== See Also ==
 
== See Also ==
Line 66: Line 69:
 
*[http://en.wikipedia.org/wiki/Rounding#Tie-breaking Rounding]
 
*[http://en.wikipedia.org/wiki/Rounding#Tie-breaking Rounding]
 
*[http://http://en.wikipedia.org/wiki/Floor_and_ceiling_functions CEILING Function]
 
*[http://http://en.wikipedia.org/wiki/Floor_and_ceiling_functions CEILING Function]
 +
 +
 +
*[[Z_API_Functions | List of Main Z Functions]]
 +
 +
*[[ Z3 |  Z3 home ]]

Latest revision as of 17:35, 13 August 2018

CEILING (Number,Significance)


  • Where 'Number' is the numeric value to round and
  • 'Significance' is the multiple to round the number.
    • CEILING() rounds the number up, away from zero, to its nearest multiple of significance.

Description

CEILING(Number, Significance)

For Example,

CEILING(3.5, 2) returns 4.

CEILING(-4.6, -2) returns -6.

  • Calci returns an NaN error message if the argument is nonnumeric.
  • Calci returns an #ERROR message if 'number' and 'significance' have different signs.
  • If the number is an exact multiple of significance, rounding will not be done. Calci will display the same number as output.
  • If significance value is not mentioned, Calci assumes it to be 1.
  • This function can also be used for array of numbers in form of equation as-
 a) CEILING(3.33..6.33,0.1) where x varies from 3.33 to 6.33 and displays output to multiples of 0.1. Displays 3.4,4.4,5.4,6.4 as output.
 b) 2.5..4.5|CEILING(x+2,2)| where x varies from 2.5 to 4.5 , adds value 2 and displays output to multiples of 2. Displays 6,6,8 as output. 

Examples

Function Output
CEILING(67.5,5) 70
CEILING(1000.34,3) 1002
CEILING(22.3) 23
CEILING(-89.45,-2) -90

Related Videos

CEILING

See Also

References