Integer count in a closed interval
ID: integer-count-in-a-closed-interval
For real numbers , the integers in the closed interval begin at and end at , if there are any. Their number is thereforeThe extra one includes both ends of the resulting integer interval. The maximum with zero handles an empty intersection: contains no integer, even though it has positive length.
For , the ceiling function selects and the floor function selects , giving . The four points are . For , the count is five, not four: the real length and the number of integer points are different quantities.
New to topics? Read the docs here!