Difference between revisions of "Manuals/calci/FLOORAT"

From ZCubes Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
==Description==
 
==Description==
 
*This function rounds the number down to the nearest integer or to its nearest multiple of significance.  
 
*This function rounds the number down to the nearest integer or to its nearest multiple of significance.  
*In <math>FLOORAT(Array,MaxNumber)</math>,<math>Number</math> is the value to be rounded down.Significance is the multiple which  want to round down.If the Number is the positive numbers with decimal portions are rounded down to the nearest integer.For example,12.43 is rounded down to 12. If the Number is the negative numbers with decimal portions are rounded away and also the given number is negative number and significance should be a negative number.The Significance argument rounds the number down to the nearest integer that is a multiple of the significance specified. The exception is where the number to be rounded is an integer.If Number divided by a Significance of 2 or greater results in a remainder, the result is rounded down.
+
*In <math>FLOORAT (Array,MaxNumber)</math>,<math>Array</math> is the value to be rounded down.Number is the multiple which  want to round down.
 +
*If the Number is the positive numbers with decimal portions are rounded down to the nearest integer.
 +
*For example,12.43 is rounded down to 12.  
 +
*If the array values are negative numbers with decimal portions are rounded away and also the given number is negative number and Max Number should be a negative number.
 +
*The array  values are rounds the number down to the nearest integer that is a multiple of the number specified.  
 +
*The exception is where the number to be rounded is an integer.
 +
*If Number divided by a Significance of 2 or greater results in a remainder, the result is rounded down.
  
 +
==Examples==
 +
#FLOORAT([23.24,34.3,76.56],1) = 23 34 76
 +
#FLOORAT([23.24,34.3,76.56],2) = 22 34 76
 +
#FLOORAT([23.24,34.3,76.56],5) = 20 30 75
  
 +
==References==
 +
*[[Manuals/calci/INT| INT]]
 +
*[[Manuals/calci/ROUND | ROUND]]
 +
*[[Manuals/calci/ROUNDUP | ROUNDUP]]
 +
*[[Manuals/calci/FLOOR | FLOOR]]
  
 +
==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]]
 
*[[Z_API_Functions | List of Main Z Functions]]
 
 
*[[ Z3 |  Z3 home ]]
 
*[[ Z3 |  Z3 home ]]

Revision as of 13:52, 23 May 2017

FLOORAT (Array,MaxNumber)


  • is the set of values.
  • is the maximum number.

Description

  • This function rounds the number down to the nearest integer or to its nearest multiple of significance.
  • In , is the value to be rounded down.Number is the multiple which want to round down.
  • If the Number is the positive numbers with decimal portions are rounded down to the nearest integer.
  • For example,12.43 is rounded down to 12.
  • If the array values are negative numbers with decimal portions are rounded away and also the given number is negative number and Max Number should be a negative number.
  • The array values are rounds the number down to the nearest integer that is a multiple of the number specified.
  • The exception is where the number to be rounded is an integer.
  • If Number divided by a Significance of 2 or greater results in a remainder, the result is rounded down.

Examples

  1. FLOORAT([23.24,34.3,76.56],1) = 23 34 76
  2. FLOORAT([23.24,34.3,76.56],2) = 22 34 76
  3. FLOORAT([23.24,34.3,76.56],5) = 20 30 75

References

References