[Tutor] faulty code (maths)

Kent Johnson kent37 at tds.net
Sun Nov 23 13:53:04 CET 2008

On Sun, Nov 23, 2008 at 6:37 AM, David <ldl08 at gmx.net> wrote:

> I am trying to solve exercise 1.18 ("Why does the following program not work
> correctly?"), but I don't find the mistake: why does the line
> q = sqrt(b*b - 4*a*c)
> cause an error? I was playing around with the code, but got nowhere.

Did you get an error? What was it? Please show the entire error
message, including the stack trace, when you have a question about an

What is the value of (b*b - 4*a*c) ? Does that give you a hint?


More information about the Tutor mailing list