Takes care of rounding errors

Both Math.cbrt() and Math.sqrt() return floats with rounding
errors. Rounding off to 4 digits precision seems to be good enough and
makes the specs pass.