Fix #46: Incorrect results of math.floor and math.ceil

Hello Robert,

Could you please review this change, and merge it if ok?

Thank you!