Add real <-> int casting with the functions real(x) and floor(x). Closes #17.