# Revision history [back]

### unable to convert floor(x) to an integer

Let's say, I want to define the following function:

sage: f(x)=mod(floor(x),5)


Then I get this error:

TypeError: unable to convert floor(x) to an integer


How can I solve this problem?