\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\begin{array}{l}
\mathbf{if}\;b \le -7.914888075650537298136924086228362423609 \cdot 10^{142}:\\
\;\;\;\;\frac{\frac{1}{-\mathsf{fma}\left(0.375, \frac{a}{\frac{{b}^{3}}{c}}, \frac{0.5}{b}\right)}}{3 \cdot a}\\
\mathbf{elif}\;b \le -5.133205541814486847475129018396623824182 \cdot 10^{-258}:\\
\;\;\;\;\frac{\sqrt{\sqrt{\mathsf{fma}\left(b, b, \left(c \cdot a\right) \cdot \left(-3\right)\right)} - b} \cdot \sqrt{\sqrt{\mathsf{fma}\left(b, b, \left(c \cdot a\right) \cdot \left(-3\right)\right)} - b}}{3 \cdot a}\\
\mathbf{elif}\;b \le 3.568355706898483080977528385553902422095 \cdot 10^{50}:\\
\;\;\;\;\frac{\frac{1}{\frac{\left(-b\right) - \sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}{3}}}{\frac{3}{c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\
\end{array}double f(double a, double b, double c) {
double r127641 = b;
double r127642 = -r127641;
double r127643 = r127641 * r127641;
double r127644 = 3.0;
double r127645 = a;
double r127646 = r127644 * r127645;
double r127647 = c;
double r127648 = r127646 * r127647;
double r127649 = r127643 - r127648;
double r127650 = sqrt(r127649);
double r127651 = r127642 + r127650;
double r127652 = r127651 / r127646;
return r127652;
}
double f(double a, double b, double c) {
double r127653 = b;
double r127654 = -7.914888075650537e+142;
bool r127655 = r127653 <= r127654;
double r127656 = 1.0;
double r127657 = 0.375;
double r127658 = a;
double r127659 = 3.0;
double r127660 = pow(r127653, r127659);
double r127661 = c;
double r127662 = r127660 / r127661;
double r127663 = r127658 / r127662;
double r127664 = 0.5;
double r127665 = r127664 / r127653;
double r127666 = fma(r127657, r127663, r127665);
double r127667 = -r127666;
double r127668 = r127656 / r127667;
double r127669 = 3.0;
double r127670 = r127669 * r127658;
double r127671 = r127668 / r127670;
double r127672 = -5.133205541814487e-258;
bool r127673 = r127653 <= r127672;
double r127674 = r127661 * r127658;
double r127675 = -r127669;
double r127676 = r127674 * r127675;
double r127677 = fma(r127653, r127653, r127676);
double r127678 = sqrt(r127677);
double r127679 = r127678 - r127653;
double r127680 = sqrt(r127679);
double r127681 = r127680 * r127680;
double r127682 = r127681 / r127670;
double r127683 = 3.568355706898483e+50;
bool r127684 = r127653 <= r127683;
double r127685 = -r127653;
double r127686 = r127653 * r127653;
double r127687 = fma(r127675, r127674, r127686);
double r127688 = sqrt(r127687);
double r127689 = r127685 - r127688;
double r127690 = r127689 / r127669;
double r127691 = r127656 / r127690;
double r127692 = r127669 / r127661;
double r127693 = r127691 / r127692;
double r127694 = r127661 / r127653;
double r127695 = -0.5;
double r127696 = r127694 * r127695;
double r127697 = r127684 ? r127693 : r127696;
double r127698 = r127673 ? r127682 : r127697;
double r127699 = r127655 ? r127671 : r127698;
return r127699;
}



Bits error versus a



Bits error versus b



Bits error versus c
if b < -7.914888075650537e+142Initial program 58.9
rmApplied flip-+64.0
Simplified62.8
Simplified62.8
rmApplied clear-num62.8
Simplified62.6
Taylor expanded around -inf 10.2
Simplified2.6
if -7.914888075650537e+142 < b < -5.133205541814487e-258Initial program 8.1
rmApplied add-sqr-sqrt8.4
Simplified8.4
Simplified8.4
if -5.133205541814487e-258 < b < 3.568355706898483e+50Initial program 28.7
rmApplied flip-+28.7
Simplified16.4
Simplified16.3
rmApplied clear-num16.5
Simplified14.3
rmApplied div-inv14.3
Applied times-frac16.9
Applied *-un-lft-identity16.9
Applied times-frac16.9
Applied associate-/l*16.8
Simplified9.9
if 3.568355706898483e+50 < b Initial program 56.9
rmApplied flip-+56.9
Simplified29.4
Simplified29.4
rmApplied clear-num29.6
Simplified29.5
rmApplied div-inv29.6
Applied times-frac29.6
Applied *-un-lft-identity29.6
Applied times-frac29.5
Applied associate-/l*28.0
Simplified26.3
Taylor expanded around inf 4.4
Final simplification7.1
herbie shell --seed 2019179 +o rules:numerics
(FPCore (a b c)
:name "Cubic critical"
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))