Week 3 Exercise 5 Bug

Hi, I believe there is an error in the function tests for week 3’s programming assignment. Here’s the error I’m receiving while I got the expected answer.

It means there is a mistake in your code while implementing the compute_cost function. Tests function is correct and it just calls your own function. So, double-check your cost_function.

Best,
Saif.

Thank you, Saif! I went in and corrected it.

I am glad you did it…

It’s good to hear that you found the solution. But just for future reference note that your answer was 0.692xxxx and the correct answer was 0.693xxxx. That is not a rounding error: it is a real mistake. We’re working in 64 bit floating point here, so rounding errors are of the order of 10^{-15} or smaller typically.