Understanding greatest integer function and least integer function

Greatest integer function (Floor function)

Also known as the floor function, GIF(x) or [x] is the greatest integer function, which returns the value of the greatest integer less than or equal to x. For example,

[3.55] will return a value 3. [-2.45] will return a value -3. This is so because -2.45 lies between -2 and -3, the lower of the two being -3 which is the greatest integer less than -2.45.

Greatest integer function graph

Fractional part

Fractional part of a number also denoted as {x} gives the value of the difference of the number and the greatest integer less than or equal to the number,

i.e {x} = x - [x]

For example, {3.45} = 0.45

Least integer function (Ceiling function)

Also known as the ceiling function, LIF(x) is the least integer function, which returns the value of the least integer more than or equal to x. For example,

LIF(3.55) will return a value 4. LIF(-2.45) will return a value -2. This is so because -2.45 lies between -2 and -3, the higher of the two being -2 which is the least integer more than -2.45.

Least integer function graph

POST A NEW COMMENT