\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\frac{1}{2} \cdot \frac{4 \cdot \left(a \cdot c\right)}{-\left(\sqrt{{b}^{2} - 4 \cdot \left(a \cdot c\right)} \cdot a + b \cdot a\right)}double f(double a, double b, double c) {
double r32749 = b;
double r32750 = -r32749;
double r32751 = r32749 * r32749;
double r32752 = 4.0;
double r32753 = a;
double r32754 = r32752 * r32753;
double r32755 = c;
double r32756 = r32754 * r32755;
double r32757 = r32751 - r32756;
double r32758 = sqrt(r32757);
double r32759 = r32750 + r32758;
double r32760 = 2.0;
double r32761 = r32760 * r32753;
double r32762 = r32759 / r32761;
return r32762;
}
double f(double a, double b, double c) {
double r32763 = 1.0;
double r32764 = 2.0;
double r32765 = r32763 / r32764;
double r32766 = 4.0;
double r32767 = a;
double r32768 = c;
double r32769 = r32767 * r32768;
double r32770 = r32766 * r32769;
double r32771 = b;
double r32772 = 2.0;
double r32773 = pow(r32771, r32772);
double r32774 = r32773 - r32770;
double r32775 = sqrt(r32774);
double r32776 = r32775 * r32767;
double r32777 = r32771 * r32767;
double r32778 = r32776 + r32777;
double r32779 = -r32778;
double r32780 = r32770 / r32779;
double r32781 = r32765 * r32780;
return r32781;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program 52.5
rmApplied flip-+52.5
Simplified0.4
rmApplied add-cbrt-cube0.4
Simplified0.4
rmApplied *-un-lft-identity0.4
Applied *-un-lft-identity0.4
Applied times-frac0.4
Applied times-frac0.4
Simplified0.4
Simplified0.4
rmApplied sub-neg0.4
Applied distribute-lft-in0.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2020042
(FPCore (a b c)
:name "Quadratic roots, wide range"
:precision binary64
:pre (and (< 4.9303800000000003e-32 a 2.02824e+31) (< 4.9303800000000003e-32 b 2.02824e+31) (< 4.9303800000000003e-32 c 2.02824e+31))
(/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))