#include <Quadratic.hpp>
Static Public Member Functions | |
static void | distinctSolutions (double b, double c, double &x1, double &x2) |
static double | smallestPositiveSolution (double b, double c) |
This static class offers functions that solve quadratic equations using a numerically stable technique. Specifically, consider a quadratic equation of the form
If
To avoid loss of significance in case the solutions have a different order of magnitude, the functions in this class use the first and third equations if
|
inlinestatic |
This function determines the solutions of
|
inlinestatic |
This function returns the smallest positive solution of