Sunday, 19 October 2014

Floors and Ceilings - Almost getting there!

From this week's lecture I found quite intriguing the importance that floor and ceiling functions play in computer theory. At the beginning I was rather skeptical of their usefulness, but that just came to show how vast the applications of computational logic really are. I'll just go ahead and offer two examples that have to do with my current programming level with Python:
  • Mod Operand (% in Python)
    • x % y = x - y floor (x/y)
    • In mathematical expression: ∀ x in Z, ∀ y in Z, ∃ z in Z, z = x - y (floor (x/y))
  • Rounding (round() in Python)
    • round(x) = floor (x + 1/2)
    • In mathematical expression: ∀ x in R, ∃ y in Z, y = floor (x + 1/2)
The important lesson here is not think harshly about some functions in mathematical reasoning. Perhaps we should apply the logic that, if it has its own symbol, it must be rather important. While doing some research about the floor and ceiling functions, I found that there are plenty more applications to it! Hopefully in a near future we will be able to see some more.

No comments:

Post a Comment