Compare numbers numerically

The old `grains.t` used `is` to test the values returned by the functions under test.  Unfortunately, `is` makes its comparisons with `eq` and the string representation of some of the numbers does not look as expected.  Using `cmp_ok` to perform numeric comparisons gets around this problem.