The problem you are having is probably to do with integers and floats. You may need to convert the integer to a float using ``to_f`` before rounding it.