quad.cpp calculate quad roots