Hello I am trying to reuse the code in G4AnalyticalPolSolver, namely the functions G4AnalyticalPolSolver::QuarticRoots and G4AnalyticalPolSolver::BiquadRoots. My question is very simple. Why does function BiQuadRoots have 5 input paramters, whereas a BiQuadratic equation should have only 4? http://www.google.com/codesearch/p?hl=de#rmG-ZVXP6CY/geant4.8.2.p01/source/global/HEPNumerics/src/G4AnalyticalPolSolver.cc&q=QuarticRoots I have coded both the functions taking your both functions as reference, as I need to solve a quartic equation in my project. I see that BiQuadRoots gives me correct answers for all the problems whereas QuarticRoots is erratic on some instances(both functions were given same input parameters) Can you please answer? Thanks in advance!
Known (at least with open source) quartic analytical solvers have numerical problems for certain configuration of roots. G4AnalyticalSolver was created for internal comparison of different quartic solvers in Geant4 addressed to geometrical calculations with torus. It is not recommended to be used for quartic root calculations.
Thanks for the answer. But the function BiQuadRoots seems to work just fine as a "Quartic" equation solver(though it shouldnt!). I ran it around 10,000 times with different co-efficients(a,b,c,d,e) which were generated randomly. There was not a single error!