4.2.3. qeq¶
This module defines the interface for solving a quadratic equation.
The quadratic equation is of the form:
where \(a\), \(b\), and \(c\) are the coefficients of the equation.\[ a x^2 + b x + c = 0, \]Of course, this is not very useful in scientific context to invoke such a solver.
It was developed as a prototype to ensure that the envisioned architecture of Open Interfaces is feasible. It is used as a simple text case as well.
Functions
- int oif_solve_qeq(ImplHandle implh, double a, double b, double c, OIFArrayF64 *roots)¶
Solve the quadratic equation \(a x^2 + b x + c = 0\).
- Parameters:
implh – [in] Implementation handle
a – [in] Coefficient of the quadratic term
b – [in] Coefficient of the linear term
c – [in] Constant term
roots – [out] Roots of the quadratic equation