In C language library functions, the floor function syntax is as follows:
# Include <math. h>
Double floor (double Arg );
Function: returns the maximum integer of no more than Arg. For example,
X = 6.04;
Y = floor (X );
The value of Y is 6.0.
The Ceil function corresponds to the floor function.
Interestingly, floor refers to the floor in English, while Ceil refers to the ceiling, which vividly describes the mathematical operations of the bottom and top rounding.
Note: If the number of values is not a numerical value, floor returns an error value # value! Or # name ?.
If the number is the opposite of the Significance symbol, the function floor returns the error value # num !.
Regardless of the positive and negative numbers of the number, the absolute value of the number of workers decreases. If the number is exactly a multiple of significance, No rounding is required.
Floor
Purpose: round the number of distinct to the end of the absolute value, so that it is equal to the multiple of the nearest significance.
Syntax: floor (number, significance)
Number: number is a value to be rounded, and significance is a multiple of the value.
Instance: Assuming a1 = 22.5, the formula "= floor (A1, 1)" returns 22; = floor (-2.5,-2) returns-2.
"Make it equal to a multiple of the nearest significance", for example:
Suppose a1 = 22.5, then the formula "= floor (A1, 1)" returns a multiple of and 22 closest to 1.
Suppose a1 = 22.5, then the formula "= floor (A1, 3)" returns a multiple of 21,21 closest to 3.
Suppose a1 = 25.8, then the formula "= floor (A1, 3)" is a multiple of 24, and 24 is the closest to 3.
Floor () and ceil () Functions