math operations were raising exception because they used `to_int`

Changed `to_int` to `to_i`.  Added a couple simple tests.

I haven't changed the gem version.