Difference between revisions of "Manuals/calci/FLOOR"

From ZCubes Wiki
Jump to navigation Jump to search
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=FLOOR(number, significance)=
+
<div style="font-size:30px">'''FLOOR(Number, Significance)'''</div><br/>
 +
*Where 'Number' is the numeric value to round and
 +
*'Significance' is the multiple to round the number.
 +
**FLOOR() rounds the number down towards zero, to its nearest multiple of significance.
  
*Where 'number' is the numeric value to round and
+
== Description ==
*significance' is the multiple to round the number.
 
  
FLOOR() rounds the number down towards zero, to its nearest multiple of significance.
+
FLOOR(Number, Significance)
  
== Description ==
+
For Example,
  
FLOOR(number, significance)
+
FLOOR (3.5, 2) ''returns 2''.
  
For Example,
+
FLOOR (-4.6, -2) ''returns -4''.
FLOOR (3.5, 2) is 2
 
  
*Calci returns an error value when argument is nonnumeric.  
+
*Calci returns an NaN error message if the argument is nonnumeric.  
*Calci returns an error message if 'number' and 'significance' have different signs.
+
*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 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) FLOOR(3.33..6.33,0.1) where x varies from 3.33 to 6.33 and displays output to multiples of 0.1. <br>''Displays 3.3,4.3,5.3,6.3'' as output.
 +
 +
  b) 2.5..4.5|FLOOR(x+2,2)| where x varies from 2.5 to 4.5 , <br>adds value 2 and displays output to multiples of 2. ''Displays 4,4,6'' as output.
  
 
== Examples ==
 
== Examples ==
Line 23: Line 30:
 
{| id="TABLE3" class="SpreadSheet blue"
 
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
|- class="even"
| class="  " |
+
| class="  " | '''Function'''
<div id="6Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
+
| class="  " | '''Output'''
| Column1
 
| class="  " | Column2
 
| class="  " | Column3
 
| class="  " | Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class=" " | 3.5
 
| class="sshl_f " | 2
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | 2
 
| class="sshl_f  " |
 
<div id="6Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="sshl_f" |FLOOR(55.55,5)
| class="sshl_f   SelectTD SelectTD" |
+
| class="sshl_f" |55
<div id="6Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="6Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
|- class="even"
 
|- class="even"
| Row4
+
| class="sshl_f" |FLOOR(1000.34,3)
| class="sshl_f" |
+
| class="sshl_f" |999
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row5
+
| class="sshl_f" |FLOOR(22.3)
| class="sshl_f" |
+
| class="sshl_f" |22
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
|- class="even"
 
|- class="even"
| Row6
+
| class="sshl_f" |FLOOR(-143.56,-1)
| class="sshl_f" |
+
| class="sshl_f" |-143
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
|}
 
|}
 +
 +
==Related Videos==
 +
 +
{{#ev:youtube|mJaqx05SOlM|280|center|FLOOR AND CEILING}}
 +
 +
== See Also ==
 +
 +
*[[Manuals/calci/CEILING | CEILING]]
 +
 +
*[[Manuals/calci/INT| INT]]
 +
 +
*[[Manuals/calci/ROUND | ROUND]]
 +
 +
*[[Manuals/calci/ROUNDUP | ROUNDUP]]
 +
 +
*[[Manuals/calci/ROUNDDOWN | ROUNDDOWN]]
 +
 +
*[[Manuals/calci/TRUNC| TRUNC]]
 +
 +
==References==
 +
 +
*[http://en.wikipedia.org/wiki/Rounding#Tie-breaking Rounding]
 +
*[http://http://en.wikipedia.org/wiki/Floor_and_ceiling_functions FLOOR Function]
 +
 +
 +
 +
 +
*[[Z_API_Functions | List of Main Z Functions]]
 +
 +
*[[ Z3 |  Z3 home ]]

Latest revision as of 17:22, 17 August 2018

FLOOR(Number, Significance)


  • Where 'Number' is the numeric value to round and
  • 'Significance' is the multiple to round the number.
    • FLOOR() rounds the number down towards zero, to its nearest multiple of significance.

Description

FLOOR(Number, Significance)

For Example,

FLOOR (3.5, 2) returns 2.

FLOOR (-4.6, -2) returns -4.

  • 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) FLOOR(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.
 b) 2.5..4.5|FLOOR(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.

Examples

Function Output
FLOOR(55.55,5) 55
FLOOR(1000.34,3) 999
FLOOR(22.3) 22
FLOOR(-143.56,-1) -143

Related Videos

FLOOR AND CEILING

See Also

References