Changes to randomMatrix to remove round-off errors.