5 Quad::Quad(Float_t a,Float_t b,Float_t c)
14 std::cout <<
"deleting object with coeffts: "
15 << fA <<
"," << fB <<
"," << fC << std::endl;
18 void Quad::Solve()
const
20 Float_t temp = fB*fB -4*fA*fC;
23 std::cout <<
"There are two roots: "
24 << ( -fB - temp ) / (2.*fA)
26 << ( -fB + temp ) / (2.*fA)
30 std::cout <<
"There are two equal roots: "
31 << -fB / (2.*fA) << std::endl;
33 std::cout <<
"There are no roots" << std::endl;
38 Float_t Quad::Evaluate(Float_t x)
const
40 return fA*x*x + fB*x + fC;