Attempting to fix rounding errors in metric computation for Mac and Linux.