Search:

Type: Posts; User: Snouman

Search: Search took 0.54 seconds.

  1. Re: Quadratic Equation. one equation doesnt work

    I understood. The problem was in brackets.
    Should be
    result1 = ( (-getB() + sqrt(discr)) / (2.0*getA()) );
    result2 = ( (-getB() - sqrt(discr)) / (2.0*getA()) );
  2. Quadratic Equation. one equation doesnt work

    With many other equations work, BUT with this one NOT.
    Have no idea why )

    Result shoud be -0.5 and -1/3(in double)
    BUT console shows me -18.0 and -12.0

    Here my class


    package task1;
Results 1 to 2 of 2