pass test for naive training test by fixing a float precision issue when calculating the output.