Pages

Friday, March 7, 2014

Floor and Ceiling

I just found about floor and ceiling functions the other day.

Briefly, a floor function,
is a function that returns the greatest integer value of a real without exceeding it, and a ceiling function,
is a function that returns the least integer value of a real once its value is exceeded.

Hence the floor of π is 3, and its ceiling is 4.

These types of functions are very useful when you've got a model whose natural output is in the real of e.g. the rationals, but whose output you need to be in the realm of the integers for the next step...This tends to happen in models built on combinatoric ideas (even if you didn't know they were combinatoric when you built them).

No comments:

Post a Comment