Cubic critical

Percentage Accurate: 52.4% → 85.8%
Time: 20.1s
Alternatives: 16
Speedup: 11.6×

Specification

?
\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 16 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 52.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\end{array}

Alternative 1: 85.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{a \cdot \left(c \cdot -3\right)}\\ \mathbf{if}\;b \leq -1 \cdot 10^{+152}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-49}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-87}:\\ \;\;\;\;\left(b - \mathsf{hypot}\left(b, t\_0\right)\right) \cdot \frac{1}{a \cdot -3}\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{+30} \lor \neg \left(b \leq 5 \cdot 10^{+33}\right):\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{3 \cdot \frac{a}{t\_0 - b}}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (* a (* c -3.0)))))
   (if (<= b -1e+152)
     (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
     (if (<= b -2.25e-49)
       (/ (- (sqrt (- (* b b) (* c (* a 3.0)))) b) (* a 3.0))
       (if (<= b 9e-87)
         (* (- b (hypot b t_0)) (/ 1.0 (* a -3.0)))
         (if (or (<= b 2.35e+30) (not (<= b 5e+33)))
           (* (/ c b) -0.5)
           (/ 1.0 (* 3.0 (/ a (- t_0 b))))))))))
double code(double a, double b, double c) {
	double t_0 = sqrt((a * (c * -3.0)));
	double tmp;
	if (b <= -1e+152) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= -2.25e-49) {
		tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	} else if (b <= 9e-87) {
		tmp = (b - hypot(b, t_0)) * (1.0 / (a * -3.0));
	} else if ((b <= 2.35e+30) || !(b <= 5e+33)) {
		tmp = (c / b) * -0.5;
	} else {
		tmp = 1.0 / (3.0 * (a / (t_0 - b)));
	}
	return tmp;
}
public static double code(double a, double b, double c) {
	double t_0 = Math.sqrt((a * (c * -3.0)));
	double tmp;
	if (b <= -1e+152) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= -2.25e-49) {
		tmp = (Math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	} else if (b <= 9e-87) {
		tmp = (b - Math.hypot(b, t_0)) * (1.0 / (a * -3.0));
	} else if ((b <= 2.35e+30) || !(b <= 5e+33)) {
		tmp = (c / b) * -0.5;
	} else {
		tmp = 1.0 / (3.0 * (a / (t_0 - b)));
	}
	return tmp;
}
def code(a, b, c):
	t_0 = math.sqrt((a * (c * -3.0)))
	tmp = 0
	if b <= -1e+152:
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
	elif b <= -2.25e-49:
		tmp = (math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0)
	elif b <= 9e-87:
		tmp = (b - math.hypot(b, t_0)) * (1.0 / (a * -3.0))
	elif (b <= 2.35e+30) or not (b <= 5e+33):
		tmp = (c / b) * -0.5
	else:
		tmp = 1.0 / (3.0 * (a / (t_0 - b)))
	return tmp
function code(a, b, c)
	t_0 = sqrt(Float64(a * Float64(c * -3.0)))
	tmp = 0.0
	if (b <= -1e+152)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
	elseif (b <= -2.25e-49)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 3.0)))) - b) / Float64(a * 3.0));
	elseif (b <= 9e-87)
		tmp = Float64(Float64(b - hypot(b, t_0)) * Float64(1.0 / Float64(a * -3.0)));
	elseif ((b <= 2.35e+30) || !(b <= 5e+33))
		tmp = Float64(Float64(c / b) * -0.5);
	else
		tmp = Float64(1.0 / Float64(3.0 * Float64(a / Float64(t_0 - b))));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	t_0 = sqrt((a * (c * -3.0)));
	tmp = 0.0;
	if (b <= -1e+152)
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	elseif (b <= -2.25e-49)
		tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	elseif (b <= 9e-87)
		tmp = (b - hypot(b, t_0)) * (1.0 / (a * -3.0));
	elseif ((b <= 2.35e+30) || ~((b <= 5e+33)))
		tmp = (c / b) * -0.5;
	else
		tmp = 1.0 / (3.0 * (a / (t_0 - b)));
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b, -1e+152], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.25e-49], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9e-87], N[(N[(b - N[Sqrt[b ^ 2 + t$95$0 ^ 2], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 2.35e+30], N[Not[LessEqual[b, 5e+33]], $MachinePrecision]], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision], N[(1.0 / N[(3.0 * N[(a / N[(t$95$0 - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{a \cdot \left(c \cdot -3\right)}\\
\mathbf{if}\;b \leq -1 \cdot 10^{+152}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\

\mathbf{elif}\;b \leq -2.25 \cdot 10^{-49}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\

\mathbf{elif}\;b \leq 9 \cdot 10^{-87}:\\
\;\;\;\;\left(b - \mathsf{hypot}\left(b, t\_0\right)\right) \cdot \frac{1}{a \cdot -3}\\

\mathbf{elif}\;b \leq 2.35 \cdot 10^{+30} \lor \neg \left(b \leq 5 \cdot 10^{+33}\right):\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{3 \cdot \frac{a}{t\_0 - b}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1e152

    1. Initial program 39.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified39.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 97.4%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg97.4%

        \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
      2. *-commutative97.4%

        \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
      3. distribute-rgt-neg-in97.4%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
      4. fma-define97.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
      5. associate-*r/97.6%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
      6. metadata-eval97.6%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
    7. Simplified97.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
    8. Taylor expanded in c around 0 97.8%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -1e152 < b < -2.2500000000000001e-49

    1. Initial program 92.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing

    if -2.2500000000000001e-49 < b < 8.99999999999999915e-87

    1. Initial program 81.1%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg81.1%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg81.1%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*81.0%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified81.0%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Applied egg-rr82.2%

      \[\leadsto \color{blue}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a \cdot -3}} \]

    if 8.99999999999999915e-87 < b < 2.34999999999999995e30 or 4.99999999999999973e33 < b

    1. Initial program 10.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg10.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg10.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*10.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified10.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 93.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. *-commutative93.4%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
    7. Simplified93.4%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]

    if 2.34999999999999995e30 < b < 4.99999999999999973e33

    1. Initial program 51.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified51.2%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 51.2%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    6. Step-by-step derivation
      1. *-commutative51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}}{3 \cdot a} \]
      2. associate-*r*51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    7. Simplified51.2%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    8. Step-by-step derivation
      1. +-commutative51.2%

        \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg51.2%

        \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}{3 \cdot a} \]
    9. Applied egg-rr51.2%

      \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}{3 \cdot a} \]
    10. Step-by-step derivation
      1. associate-*r*51.2%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}} - b}{3 \cdot a} \]
      2. *-commutative51.2%

        \[\leadsto \frac{\sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      3. *-commutative51.2%

        \[\leadsto \frac{\sqrt{-3 \cdot \color{blue}{\left(c \cdot a\right)}} - b}{3 \cdot a} \]
    11. Simplified51.2%

      \[\leadsto \frac{\color{blue}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}}{3 \cdot a} \]
    12. Step-by-step derivation
      1. clear-num51.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{3 \cdot a}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}}} \]
      2. inv-pow51.2%

        \[\leadsto \color{blue}{{\left(\frac{3 \cdot a}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}\right)}^{-1}} \]
      3. associate-/l*51.2%

        \[\leadsto {\color{blue}{\left(3 \cdot \frac{a}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}\right)}}^{-1} \]
      4. *-commutative51.2%

        \[\leadsto {\left(3 \cdot \frac{a}{\sqrt{\color{blue}{\left(c \cdot a\right) \cdot -3}} - b}\right)}^{-1} \]
      5. *-commutative51.2%

        \[\leadsto {\left(3 \cdot \frac{a}{\sqrt{\color{blue}{\left(a \cdot c\right)} \cdot -3} - b}\right)}^{-1} \]
      6. associate-*l*51.2%

        \[\leadsto {\left(3 \cdot \frac{a}{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}} - b}\right)}^{-1} \]
    13. Applied egg-rr51.2%

      \[\leadsto \color{blue}{{\left(3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}\right)}^{-1}} \]
    14. Step-by-step derivation
      1. unpow-151.2%

        \[\leadsto \color{blue}{\frac{1}{3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}} \]
    15. Simplified51.2%

      \[\leadsto \color{blue}{\frac{1}{3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification90.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+152}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-49}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-87}:\\ \;\;\;\;\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a \cdot -3}\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{+30} \lor \neg \left(b \leq 5 \cdot 10^{+33}\right):\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 85.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{a \cdot \left(c \cdot -3\right)}\\ \mathbf{if}\;b \leq -5 \cdot 10^{+151}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-49}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-90}:\\ \;\;\;\;\frac{\left(b - \mathsf{hypot}\left(b, t\_0\right)\right) \cdot -0.3333333333333333}{a}\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{+30} \lor \neg \left(b \leq 5 \cdot 10^{+33}\right):\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{3 \cdot \frac{a}{t\_0 - b}}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (* a (* c -3.0)))))
   (if (<= b -5e+151)
     (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
     (if (<= b -2.25e-49)
       (/ (- (sqrt (- (* b b) (* c (* a 3.0)))) b) (* a 3.0))
       (if (<= b 2.5e-90)
         (/ (* (- b (hypot b t_0)) -0.3333333333333333) a)
         (if (or (<= b 2.35e+30) (not (<= b 5e+33)))
           (* (/ c b) -0.5)
           (/ 1.0 (* 3.0 (/ a (- t_0 b))))))))))
double code(double a, double b, double c) {
	double t_0 = sqrt((a * (c * -3.0)));
	double tmp;
	if (b <= -5e+151) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= -2.25e-49) {
		tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	} else if (b <= 2.5e-90) {
		tmp = ((b - hypot(b, t_0)) * -0.3333333333333333) / a;
	} else if ((b <= 2.35e+30) || !(b <= 5e+33)) {
		tmp = (c / b) * -0.5;
	} else {
		tmp = 1.0 / (3.0 * (a / (t_0 - b)));
	}
	return tmp;
}
public static double code(double a, double b, double c) {
	double t_0 = Math.sqrt((a * (c * -3.0)));
	double tmp;
	if (b <= -5e+151) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= -2.25e-49) {
		tmp = (Math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	} else if (b <= 2.5e-90) {
		tmp = ((b - Math.hypot(b, t_0)) * -0.3333333333333333) / a;
	} else if ((b <= 2.35e+30) || !(b <= 5e+33)) {
		tmp = (c / b) * -0.5;
	} else {
		tmp = 1.0 / (3.0 * (a / (t_0 - b)));
	}
	return tmp;
}
def code(a, b, c):
	t_0 = math.sqrt((a * (c * -3.0)))
	tmp = 0
	if b <= -5e+151:
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
	elif b <= -2.25e-49:
		tmp = (math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0)
	elif b <= 2.5e-90:
		tmp = ((b - math.hypot(b, t_0)) * -0.3333333333333333) / a
	elif (b <= 2.35e+30) or not (b <= 5e+33):
		tmp = (c / b) * -0.5
	else:
		tmp = 1.0 / (3.0 * (a / (t_0 - b)))
	return tmp
function code(a, b, c)
	t_0 = sqrt(Float64(a * Float64(c * -3.0)))
	tmp = 0.0
	if (b <= -5e+151)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
	elseif (b <= -2.25e-49)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 3.0)))) - b) / Float64(a * 3.0));
	elseif (b <= 2.5e-90)
		tmp = Float64(Float64(Float64(b - hypot(b, t_0)) * -0.3333333333333333) / a);
	elseif ((b <= 2.35e+30) || !(b <= 5e+33))
		tmp = Float64(Float64(c / b) * -0.5);
	else
		tmp = Float64(1.0 / Float64(3.0 * Float64(a / Float64(t_0 - b))));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	t_0 = sqrt((a * (c * -3.0)));
	tmp = 0.0;
	if (b <= -5e+151)
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	elseif (b <= -2.25e-49)
		tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	elseif (b <= 2.5e-90)
		tmp = ((b - hypot(b, t_0)) * -0.3333333333333333) / a;
	elseif ((b <= 2.35e+30) || ~((b <= 5e+33)))
		tmp = (c / b) * -0.5;
	else
		tmp = 1.0 / (3.0 * (a / (t_0 - b)));
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b, -5e+151], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.25e-49], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.5e-90], N[(N[(N[(b - N[Sqrt[b ^ 2 + t$95$0 ^ 2], $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] / a), $MachinePrecision], If[Or[LessEqual[b, 2.35e+30], N[Not[LessEqual[b, 5e+33]], $MachinePrecision]], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision], N[(1.0 / N[(3.0 * N[(a / N[(t$95$0 - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{a \cdot \left(c \cdot -3\right)}\\
\mathbf{if}\;b \leq -5 \cdot 10^{+151}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\

\mathbf{elif}\;b \leq -2.25 \cdot 10^{-49}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\

\mathbf{elif}\;b \leq 2.5 \cdot 10^{-90}:\\
\;\;\;\;\frac{\left(b - \mathsf{hypot}\left(b, t\_0\right)\right) \cdot -0.3333333333333333}{a}\\

\mathbf{elif}\;b \leq 2.35 \cdot 10^{+30} \lor \neg \left(b \leq 5 \cdot 10^{+33}\right):\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{3 \cdot \frac{a}{t\_0 - b}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -5.0000000000000002e151

    1. Initial program 39.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified39.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 97.4%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg97.4%

        \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
      2. *-commutative97.4%

        \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
      3. distribute-rgt-neg-in97.4%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
      4. fma-define97.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
      5. associate-*r/97.6%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
      6. metadata-eval97.6%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
    7. Simplified97.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
    8. Taylor expanded in c around 0 97.8%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -5.0000000000000002e151 < b < -2.2500000000000001e-49

    1. Initial program 92.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing

    if -2.2500000000000001e-49 < b < 2.5000000000000001e-90

    1. Initial program 81.1%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg81.1%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg81.1%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*81.0%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified81.0%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Applied egg-rr82.2%

      \[\leadsto \color{blue}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a \cdot -3}} \]
    6. Step-by-step derivation
      1. associate-*r/82.2%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{a \cdot -3}} \]
      2. *-commutative82.2%

        \[\leadsto \frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{\color{blue}{-3 \cdot a}} \]
      3. frac-times82.2%

        \[\leadsto \color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{-3} \cdot \frac{1}{a}} \]
      4. un-div-inv82.1%

        \[\leadsto \color{blue}{\frac{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{-3}}{a}} \]
      5. div-inv82.1%

        \[\leadsto \frac{\color{blue}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{-3}}}{a} \]
      6. metadata-eval82.1%

        \[\leadsto \frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \color{blue}{-0.3333333333333333}}{a} \]
    7. Applied egg-rr82.1%

      \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot -0.3333333333333333}{a}} \]

    if 2.5000000000000001e-90 < b < 2.34999999999999995e30 or 4.99999999999999973e33 < b

    1. Initial program 10.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg10.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg10.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*10.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified10.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 93.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. *-commutative93.4%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
    7. Simplified93.4%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]

    if 2.34999999999999995e30 < b < 4.99999999999999973e33

    1. Initial program 51.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified51.2%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 51.2%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    6. Step-by-step derivation
      1. *-commutative51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}}{3 \cdot a} \]
      2. associate-*r*51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    7. Simplified51.2%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    8. Step-by-step derivation
      1. +-commutative51.2%

        \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg51.2%

        \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}{3 \cdot a} \]
    9. Applied egg-rr51.2%

      \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}{3 \cdot a} \]
    10. Step-by-step derivation
      1. associate-*r*51.2%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}} - b}{3 \cdot a} \]
      2. *-commutative51.2%

        \[\leadsto \frac{\sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      3. *-commutative51.2%

        \[\leadsto \frac{\sqrt{-3 \cdot \color{blue}{\left(c \cdot a\right)}} - b}{3 \cdot a} \]
    11. Simplified51.2%

      \[\leadsto \frac{\color{blue}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}}{3 \cdot a} \]
    12. Step-by-step derivation
      1. clear-num51.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{3 \cdot a}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}}} \]
      2. inv-pow51.2%

        \[\leadsto \color{blue}{{\left(\frac{3 \cdot a}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}\right)}^{-1}} \]
      3. associate-/l*51.2%

        \[\leadsto {\color{blue}{\left(3 \cdot \frac{a}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}\right)}}^{-1} \]
      4. *-commutative51.2%

        \[\leadsto {\left(3 \cdot \frac{a}{\sqrt{\color{blue}{\left(c \cdot a\right) \cdot -3}} - b}\right)}^{-1} \]
      5. *-commutative51.2%

        \[\leadsto {\left(3 \cdot \frac{a}{\sqrt{\color{blue}{\left(a \cdot c\right)} \cdot -3} - b}\right)}^{-1} \]
      6. associate-*l*51.2%

        \[\leadsto {\left(3 \cdot \frac{a}{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}} - b}\right)}^{-1} \]
    13. Applied egg-rr51.2%

      \[\leadsto \color{blue}{{\left(3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}\right)}^{-1}} \]
    14. Step-by-step derivation
      1. unpow-151.2%

        \[\leadsto \color{blue}{\frac{1}{3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}} \]
    15. Simplified51.2%

      \[\leadsto \color{blue}{\frac{1}{3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification90.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+151}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-49}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-90}:\\ \;\;\;\;\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot -0.3333333333333333}{a}\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{+30} \lor \neg \left(b \leq 5 \cdot 10^{+33}\right):\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{a \cdot \left(c \cdot -3\right)}\\ \mathbf{if}\;b \leq -2.45 \cdot 10^{+153}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-49}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-87}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{a}{b - \mathsf{hypot}\left(b, t\_0\right)}}\\ \mathbf{elif}\;b \leq 10^{+27} \lor \neg \left(b \leq 5 \cdot 10^{+33}\right):\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{3 \cdot \frac{a}{t\_0 - b}}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (* a (* c -3.0)))))
   (if (<= b -2.45e+153)
     (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
     (if (<= b -2.25e-49)
       (/ (- (sqrt (- (* b b) (* c (* a 3.0)))) b) (* a 3.0))
       (if (<= b 6.6e-87)
         (/ -0.3333333333333333 (/ a (- b (hypot b t_0))))
         (if (or (<= b 1e+27) (not (<= b 5e+33)))
           (* (/ c b) -0.5)
           (/ 1.0 (* 3.0 (/ a (- t_0 b))))))))))
double code(double a, double b, double c) {
	double t_0 = sqrt((a * (c * -3.0)));
	double tmp;
	if (b <= -2.45e+153) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= -2.25e-49) {
		tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	} else if (b <= 6.6e-87) {
		tmp = -0.3333333333333333 / (a / (b - hypot(b, t_0)));
	} else if ((b <= 1e+27) || !(b <= 5e+33)) {
		tmp = (c / b) * -0.5;
	} else {
		tmp = 1.0 / (3.0 * (a / (t_0 - b)));
	}
	return tmp;
}
public static double code(double a, double b, double c) {
	double t_0 = Math.sqrt((a * (c * -3.0)));
	double tmp;
	if (b <= -2.45e+153) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= -2.25e-49) {
		tmp = (Math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	} else if (b <= 6.6e-87) {
		tmp = -0.3333333333333333 / (a / (b - Math.hypot(b, t_0)));
	} else if ((b <= 1e+27) || !(b <= 5e+33)) {
		tmp = (c / b) * -0.5;
	} else {
		tmp = 1.0 / (3.0 * (a / (t_0 - b)));
	}
	return tmp;
}
def code(a, b, c):
	t_0 = math.sqrt((a * (c * -3.0)))
	tmp = 0
	if b <= -2.45e+153:
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
	elif b <= -2.25e-49:
		tmp = (math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0)
	elif b <= 6.6e-87:
		tmp = -0.3333333333333333 / (a / (b - math.hypot(b, t_0)))
	elif (b <= 1e+27) or not (b <= 5e+33):
		tmp = (c / b) * -0.5
	else:
		tmp = 1.0 / (3.0 * (a / (t_0 - b)))
	return tmp
function code(a, b, c)
	t_0 = sqrt(Float64(a * Float64(c * -3.0)))
	tmp = 0.0
	if (b <= -2.45e+153)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
	elseif (b <= -2.25e-49)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 3.0)))) - b) / Float64(a * 3.0));
	elseif (b <= 6.6e-87)
		tmp = Float64(-0.3333333333333333 / Float64(a / Float64(b - hypot(b, t_0))));
	elseif ((b <= 1e+27) || !(b <= 5e+33))
		tmp = Float64(Float64(c / b) * -0.5);
	else
		tmp = Float64(1.0 / Float64(3.0 * Float64(a / Float64(t_0 - b))));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	t_0 = sqrt((a * (c * -3.0)));
	tmp = 0.0;
	if (b <= -2.45e+153)
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	elseif (b <= -2.25e-49)
		tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	elseif (b <= 6.6e-87)
		tmp = -0.3333333333333333 / (a / (b - hypot(b, t_0)));
	elseif ((b <= 1e+27) || ~((b <= 5e+33)))
		tmp = (c / b) * -0.5;
	else
		tmp = 1.0 / (3.0 * (a / (t_0 - b)));
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b, -2.45e+153], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.25e-49], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.6e-87], N[(-0.3333333333333333 / N[(a / N[(b - N[Sqrt[b ^ 2 + t$95$0 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 1e+27], N[Not[LessEqual[b, 5e+33]], $MachinePrecision]], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision], N[(1.0 / N[(3.0 * N[(a / N[(t$95$0 - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{a \cdot \left(c \cdot -3\right)}\\
\mathbf{if}\;b \leq -2.45 \cdot 10^{+153}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\

\mathbf{elif}\;b \leq -2.25 \cdot 10^{-49}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\

\mathbf{elif}\;b \leq 6.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{a}{b - \mathsf{hypot}\left(b, t\_0\right)}}\\

\mathbf{elif}\;b \leq 10^{+27} \lor \neg \left(b \leq 5 \cdot 10^{+33}\right):\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{3 \cdot \frac{a}{t\_0 - b}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -2.45000000000000001e153

    1. Initial program 39.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified39.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 97.4%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg97.4%

        \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
      2. *-commutative97.4%

        \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
      3. distribute-rgt-neg-in97.4%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
      4. fma-define97.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
      5. associate-*r/97.6%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
      6. metadata-eval97.6%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
    7. Simplified97.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
    8. Taylor expanded in c around 0 97.8%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -2.45000000000000001e153 < b < -2.2500000000000001e-49

    1. Initial program 92.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing

    if -2.2500000000000001e-49 < b < 6.6000000000000001e-87

    1. Initial program 81.1%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg81.1%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg81.1%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*81.0%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified81.0%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Applied egg-rr82.2%

      \[\leadsto \color{blue}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a \cdot -3}} \]
    6. Step-by-step derivation
      1. associate-*r/82.2%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{a \cdot -3}} \]
      2. *-commutative82.2%

        \[\leadsto \frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{\color{blue}{-3 \cdot a}} \]
      3. frac-times82.2%

        \[\leadsto \color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{-3} \cdot \frac{1}{a}} \]
      4. un-div-inv82.1%

        \[\leadsto \color{blue}{\frac{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{-3}}{a}} \]
      5. div-inv82.1%

        \[\leadsto \frac{\color{blue}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{-3}}}{a} \]
      6. metadata-eval82.1%

        \[\leadsto \frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \color{blue}{-0.3333333333333333}}{a} \]
    7. Applied egg-rr82.1%

      \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot -0.3333333333333333}{a}} \]
    8. Step-by-step derivation
      1. clear-num82.1%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot -0.3333333333333333}}} \]
      2. inv-pow82.1%

        \[\leadsto \color{blue}{{\left(\frac{a}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot -0.3333333333333333}\right)}^{-1}} \]
      3. *-un-lft-identity82.1%

        \[\leadsto {\left(\frac{\color{blue}{1 \cdot a}}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot -0.3333333333333333}\right)}^{-1} \]
      4. *-commutative82.1%

        \[\leadsto {\left(\frac{1 \cdot a}{\color{blue}{-0.3333333333333333 \cdot \left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right)}}\right)}^{-1} \]
      5. times-frac82.0%

        \[\leadsto {\color{blue}{\left(\frac{1}{-0.3333333333333333} \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}\right)}}^{-1} \]
      6. metadata-eval82.0%

        \[\leadsto {\left(\color{blue}{-3} \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}\right)}^{-1} \]
    9. Applied egg-rr82.0%

      \[\leadsto \color{blue}{{\left(-3 \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. unpow-182.0%

        \[\leadsto \color{blue}{\frac{1}{-3 \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      2. rem-square-sqrt0.0%

        \[\leadsto \frac{1}{\color{blue}{\left(\sqrt{-3} \cdot \sqrt{-3}\right)} \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      3. unpow20.0%

        \[\leadsto \frac{1}{\color{blue}{{\left(\sqrt{-3}\right)}^{2}} \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      4. associate-/r*0.0%

        \[\leadsto \color{blue}{\frac{\frac{1}{{\left(\sqrt{-3}\right)}^{2}}}{\frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      5. unpow20.0%

        \[\leadsto \frac{\frac{1}{\color{blue}{\sqrt{-3} \cdot \sqrt{-3}}}}{\frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      6. rem-square-sqrt82.0%

        \[\leadsto \frac{\frac{1}{\color{blue}{-3}}}{\frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      7. metadata-eval82.0%

        \[\leadsto \frac{\color{blue}{-0.3333333333333333}}{\frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
    11. Simplified82.0%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]

    if 6.6000000000000001e-87 < b < 1e27 or 4.99999999999999973e33 < b

    1. Initial program 10.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg10.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg10.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*10.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified10.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 93.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. *-commutative93.4%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
    7. Simplified93.4%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]

    if 1e27 < b < 4.99999999999999973e33

    1. Initial program 51.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified51.2%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 51.2%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    6. Step-by-step derivation
      1. *-commutative51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}}{3 \cdot a} \]
      2. associate-*r*51.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    7. Simplified51.2%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    8. Step-by-step derivation
      1. +-commutative51.2%

        \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg51.2%

        \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}{3 \cdot a} \]
    9. Applied egg-rr51.2%

      \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}{3 \cdot a} \]
    10. Step-by-step derivation
      1. associate-*r*51.2%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}} - b}{3 \cdot a} \]
      2. *-commutative51.2%

        \[\leadsto \frac{\sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      3. *-commutative51.2%

        \[\leadsto \frac{\sqrt{-3 \cdot \color{blue}{\left(c \cdot a\right)}} - b}{3 \cdot a} \]
    11. Simplified51.2%

      \[\leadsto \frac{\color{blue}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}}{3 \cdot a} \]
    12. Step-by-step derivation
      1. clear-num51.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{3 \cdot a}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}}} \]
      2. inv-pow51.2%

        \[\leadsto \color{blue}{{\left(\frac{3 \cdot a}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}\right)}^{-1}} \]
      3. associate-/l*51.2%

        \[\leadsto {\color{blue}{\left(3 \cdot \frac{a}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}\right)}}^{-1} \]
      4. *-commutative51.2%

        \[\leadsto {\left(3 \cdot \frac{a}{\sqrt{\color{blue}{\left(c \cdot a\right) \cdot -3}} - b}\right)}^{-1} \]
      5. *-commutative51.2%

        \[\leadsto {\left(3 \cdot \frac{a}{\sqrt{\color{blue}{\left(a \cdot c\right)} \cdot -3} - b}\right)}^{-1} \]
      6. associate-*l*51.2%

        \[\leadsto {\left(3 \cdot \frac{a}{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}} - b}\right)}^{-1} \]
    13. Applied egg-rr51.2%

      \[\leadsto \color{blue}{{\left(3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}\right)}^{-1}} \]
    14. Step-by-step derivation
      1. unpow-151.2%

        \[\leadsto \color{blue}{\frac{1}{3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}} \]
    15. Simplified51.2%

      \[\leadsto \color{blue}{\frac{1}{3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification90.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.45 \cdot 10^{+153}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-49}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-87}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}\\ \mathbf{elif}\;b \leq 10^{+27} \lor \neg \left(b \leq 5 \cdot 10^{+33}\right):\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{3 \cdot \frac{a}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 84.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -8.8 \cdot 10^{+173}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-88}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -8.8e+173)
   (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
   (if (<= b 2.6e-88)
     (/ (- (sqrt (- (* b b) (* c (* a 3.0)))) b) (* a 3.0))
     (* (/ c b) -0.5))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -8.8e+173) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= 2.6e-88) {
		tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-8.8d+173)) then
        tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
    else if (b <= 2.6d-88) then
        tmp = (sqrt(((b * b) - (c * (a * 3.0d0)))) - b) / (a * 3.0d0)
    else
        tmp = (c / b) * (-0.5d0)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -8.8e+173) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= 2.6e-88) {
		tmp = (Math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -8.8e+173:
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
	elif b <= 2.6e-88:
		tmp = (math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0)
	else:
		tmp = (c / b) * -0.5
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -8.8e+173)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
	elseif (b <= 2.6e-88)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 3.0)))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(Float64(c / b) * -0.5);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -8.8e+173)
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	elseif (b <= 2.6e-88)
		tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	else
		tmp = (c / b) * -0.5;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -8.8e+173], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.6e-88], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.8 \cdot 10^{+173}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\

\mathbf{elif}\;b \leq 2.6 \cdot 10^{-88}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8.7999999999999999e173

    1. Initial program 42.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg42.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg42.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*42.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified42.8%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 97.3%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg97.3%

        \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
      2. *-commutative97.3%

        \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
      3. distribute-rgt-neg-in97.3%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
      4. fma-define97.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
      5. associate-*r/97.4%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
      6. metadata-eval97.4%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
    7. Simplified97.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
    8. Taylor expanded in c around 0 97.7%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -8.7999999999999999e173 < b < 2.60000000000000014e-88

    1. Initial program 82.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing

    if 2.60000000000000014e-88 < b

    1. Initial program 11.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified11.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 91.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. *-commutative91.4%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
    7. Simplified91.4%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.8 \cdot 10^{+173}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-88}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -8.8 \cdot 10^{+173}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -8.8e+173)
   (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
   (if (<= b 7.8e-90)
     (/ (- (sqrt (- (* b b) (* 3.0 (* a c)))) b) (* a 3.0))
     (* (/ c b) -0.5))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -8.8e+173) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= 7.8e-90) {
		tmp = (sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-8.8d+173)) then
        tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
    else if (b <= 7.8d-90) then
        tmp = (sqrt(((b * b) - (3.0d0 * (a * c)))) - b) / (a * 3.0d0)
    else
        tmp = (c / b) * (-0.5d0)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -8.8e+173) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= 7.8e-90) {
		tmp = (Math.sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -8.8e+173:
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
	elif b <= 7.8e-90:
		tmp = (math.sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0)
	else:
		tmp = (c / b) * -0.5
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -8.8e+173)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
	elseif (b <= 7.8e-90)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(3.0 * Float64(a * c)))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(Float64(c / b) * -0.5);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -8.8e+173)
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	elseif (b <= 7.8e-90)
		tmp = (sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0);
	else
		tmp = (c / b) * -0.5;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -8.8e+173], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.8e-90], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.8 \cdot 10^{+173}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\

\mathbf{elif}\;b \leq 7.8 \cdot 10^{-90}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8.7999999999999999e173

    1. Initial program 42.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg42.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg42.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*42.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified42.8%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 97.3%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg97.3%

        \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
      2. *-commutative97.3%

        \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
      3. distribute-rgt-neg-in97.3%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
      4. fma-define97.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
      5. associate-*r/97.4%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
      6. metadata-eval97.4%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
    7. Simplified97.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
    8. Taylor expanded in c around 0 97.7%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -8.7999999999999999e173 < b < 7.80000000000000009e-90

    1. Initial program 82.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg82.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg82.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*82.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified82.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing

    if 7.80000000000000009e-90 < b

    1. Initial program 11.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified11.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 91.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. *-commutative91.4%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
    7. Simplified91.4%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.8 \cdot 10^{+173}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 80.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.4 \cdot 10^{+14}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-87}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -4.4e+14)
   (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
   (if (<= b 5.2e-87)
     (/ (- (sqrt (* c (* a -3.0))) b) (* a 3.0))
     (* (/ c b) -0.5))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -4.4e+14) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= 5.2e-87) {
		tmp = (sqrt((c * (a * -3.0))) - b) / (a * 3.0);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-4.4d+14)) then
        tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
    else if (b <= 5.2d-87) then
        tmp = (sqrt((c * (a * (-3.0d0)))) - b) / (a * 3.0d0)
    else
        tmp = (c / b) * (-0.5d0)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -4.4e+14) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= 5.2e-87) {
		tmp = (Math.sqrt((c * (a * -3.0))) - b) / (a * 3.0);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -4.4e+14:
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
	elif b <= 5.2e-87:
		tmp = (math.sqrt((c * (a * -3.0))) - b) / (a * 3.0)
	else:
		tmp = (c / b) * -0.5
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -4.4e+14)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
	elseif (b <= 5.2e-87)
		tmp = Float64(Float64(sqrt(Float64(c * Float64(a * -3.0))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(Float64(c / b) * -0.5);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -4.4e+14)
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	elseif (b <= 5.2e-87)
		tmp = (sqrt((c * (a * -3.0))) - b) / (a * 3.0);
	else
		tmp = (c / b) * -0.5;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -4.4e+14], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.2e-87], N[(N[(N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{+14}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\

\mathbf{elif}\;b \leq 5.2 \cdot 10^{-87}:\\
\;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.4e14

    1. Initial program 59.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg59.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg59.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*59.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified59.7%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 90.9%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg90.9%

        \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
      2. *-commutative90.9%

        \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
      3. distribute-rgt-neg-in90.9%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
      4. fma-define90.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
      5. associate-*r/91.0%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
      6. metadata-eval91.0%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
    7. Simplified91.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
    8. Taylor expanded in c around 0 91.1%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -4.4e14 < b < 5.20000000000000005e-87

    1. Initial program 83.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg83.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg83.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*83.1%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified83.1%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 69.4%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    6. Step-by-step derivation
      1. *-commutative69.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}}{3 \cdot a} \]
      2. *-commutative69.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(c \cdot a\right)} \cdot -3}}{3 \cdot a} \]
      3. associate-*r*69.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{c \cdot \left(a \cdot -3\right)}}}{3 \cdot a} \]
    7. Simplified69.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{c \cdot \left(a \cdot -3\right)}}}{3 \cdot a} \]

    if 5.20000000000000005e-87 < b

    1. Initial program 11.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified11.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 91.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. *-commutative91.4%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
    7. Simplified91.4%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification83.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.4 \cdot 10^{+14}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-87}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 79.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+14}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-87}:\\ \;\;\;\;\left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right) \cdot \frac{0.3333333333333333}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -3.5e+14)
   (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
   (if (<= b 8.5e-87)
     (* (- (sqrt (* a (* c -3.0))) b) (/ 0.3333333333333333 a))
     (* (/ c b) -0.5))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -3.5e+14) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= 8.5e-87) {
		tmp = (sqrt((a * (c * -3.0))) - b) * (0.3333333333333333 / a);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-3.5d+14)) then
        tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
    else if (b <= 8.5d-87) then
        tmp = (sqrt((a * (c * (-3.0d0)))) - b) * (0.3333333333333333d0 / a)
    else
        tmp = (c / b) * (-0.5d0)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -3.5e+14) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= 8.5e-87) {
		tmp = (Math.sqrt((a * (c * -3.0))) - b) * (0.3333333333333333 / a);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -3.5e+14:
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
	elif b <= 8.5e-87:
		tmp = (math.sqrt((a * (c * -3.0))) - b) * (0.3333333333333333 / a)
	else:
		tmp = (c / b) * -0.5
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -3.5e+14)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
	elseif (b <= 8.5e-87)
		tmp = Float64(Float64(sqrt(Float64(a * Float64(c * -3.0))) - b) * Float64(0.3333333333333333 / a));
	else
		tmp = Float64(Float64(c / b) * -0.5);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -3.5e+14)
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	elseif (b <= 8.5e-87)
		tmp = (sqrt((a * (c * -3.0))) - b) * (0.3333333333333333 / a);
	else
		tmp = (c / b) * -0.5;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -3.5e+14], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e-87], N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] * N[(0.3333333333333333 / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+14}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\

\mathbf{elif}\;b \leq 8.5 \cdot 10^{-87}:\\
\;\;\;\;\left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right) \cdot \frac{0.3333333333333333}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.5e14

    1. Initial program 59.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg59.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg59.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*59.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified59.7%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 90.9%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg90.9%

        \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
      2. *-commutative90.9%

        \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
      3. distribute-rgt-neg-in90.9%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
      4. fma-define90.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
      5. associate-*r/91.0%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
      6. metadata-eval91.0%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
    7. Simplified91.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
    8. Taylor expanded in c around 0 91.1%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -3.5e14 < b < 8.5000000000000001e-87

    1. Initial program 83.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg83.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg83.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*83.1%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified83.1%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 69.4%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    6. Step-by-step derivation
      1. *-commutative69.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}}{3 \cdot a} \]
      2. associate-*r*69.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    7. Simplified69.4%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    8. Step-by-step derivation
      1. +-commutative69.4%

        \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg69.4%

        \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}{3 \cdot a} \]
    9. Applied egg-rr69.4%

      \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}{3 \cdot a} \]
    10. Step-by-step derivation
      1. associate-*r*69.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}} - b}{3 \cdot a} \]
      2. *-commutative69.4%

        \[\leadsto \frac{\sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      3. *-commutative69.4%

        \[\leadsto \frac{\sqrt{-3 \cdot \color{blue}{\left(c \cdot a\right)}} - b}{3 \cdot a} \]
    11. Simplified69.4%

      \[\leadsto \frac{\color{blue}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}}{3 \cdot a} \]
    12. Step-by-step derivation
      1. clear-num69.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{3 \cdot a}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}}} \]
      2. associate-/r/69.3%

        \[\leadsto \color{blue}{\frac{1}{3 \cdot a} \cdot \left(\sqrt{-3 \cdot \left(c \cdot a\right)} - b\right)} \]
      3. associate-/r*69.4%

        \[\leadsto \color{blue}{\frac{\frac{1}{3}}{a}} \cdot \left(\sqrt{-3 \cdot \left(c \cdot a\right)} - b\right) \]
      4. metadata-eval69.4%

        \[\leadsto \frac{\color{blue}{0.3333333333333333}}{a} \cdot \left(\sqrt{-3 \cdot \left(c \cdot a\right)} - b\right) \]
      5. *-commutative69.4%

        \[\leadsto \frac{0.3333333333333333}{a} \cdot \left(\sqrt{\color{blue}{\left(c \cdot a\right) \cdot -3}} - b\right) \]
      6. *-commutative69.4%

        \[\leadsto \frac{0.3333333333333333}{a} \cdot \left(\sqrt{\color{blue}{\left(a \cdot c\right)} \cdot -3} - b\right) \]
      7. associate-*l*69.5%

        \[\leadsto \frac{0.3333333333333333}{a} \cdot \left(\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}} - b\right) \]
    13. Applied egg-rr69.5%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right)} \]

    if 8.5000000000000001e-87 < b

    1. Initial program 11.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified11.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 91.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. *-commutative91.4%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
    7. Simplified91.4%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification83.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+14}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-87}:\\ \;\;\;\;\left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right) \cdot \frac{0.3333333333333333}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 79.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+14}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{-106}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -3.5e+14)
   (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
   (if (<= b 8.2e-106)
     (* 0.3333333333333333 (/ (- (sqrt (* a (* c -3.0))) b) a))
     (* (/ c b) -0.5))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -3.5e+14) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= 8.2e-106) {
		tmp = 0.3333333333333333 * ((sqrt((a * (c * -3.0))) - b) / a);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-3.5d+14)) then
        tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
    else if (b <= 8.2d-106) then
        tmp = 0.3333333333333333d0 * ((sqrt((a * (c * (-3.0d0)))) - b) / a)
    else
        tmp = (c / b) * (-0.5d0)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -3.5e+14) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else if (b <= 8.2e-106) {
		tmp = 0.3333333333333333 * ((Math.sqrt((a * (c * -3.0))) - b) / a);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -3.5e+14:
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
	elif b <= 8.2e-106:
		tmp = 0.3333333333333333 * ((math.sqrt((a * (c * -3.0))) - b) / a)
	else:
		tmp = (c / b) * -0.5
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -3.5e+14)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
	elseif (b <= 8.2e-106)
		tmp = Float64(0.3333333333333333 * Float64(Float64(sqrt(Float64(a * Float64(c * -3.0))) - b) / a));
	else
		tmp = Float64(Float64(c / b) * -0.5);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -3.5e+14)
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	elseif (b <= 8.2e-106)
		tmp = 0.3333333333333333 * ((sqrt((a * (c * -3.0))) - b) / a);
	else
		tmp = (c / b) * -0.5;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -3.5e+14], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.2e-106], N[(0.3333333333333333 * N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+14}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\

\mathbf{elif}\;b \leq 8.2 \cdot 10^{-106}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.5e14

    1. Initial program 59.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg59.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg59.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*59.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified59.7%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 90.9%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg90.9%

        \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
      2. *-commutative90.9%

        \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
      3. distribute-rgt-neg-in90.9%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
      4. fma-define90.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
      5. associate-*r/91.0%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
      6. metadata-eval91.0%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
    7. Simplified91.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
    8. Taylor expanded in c around 0 91.1%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -3.5e14 < b < 8.1999999999999998e-106

    1. Initial program 82.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg82.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg82.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*82.6%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified82.6%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 68.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    6. Step-by-step derivation
      1. *-commutative68.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}}{3 \cdot a} \]
      2. associate-*r*68.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    7. Simplified68.4%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    8. Step-by-step derivation
      1. +-commutative68.4%

        \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg68.4%

        \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}{3 \cdot a} \]
    9. Applied egg-rr68.4%

      \[\leadsto \frac{\color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} - b}}{3 \cdot a} \]
    10. Step-by-step derivation
      1. associate-*r*68.3%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}} - b}{3 \cdot a} \]
      2. *-commutative68.3%

        \[\leadsto \frac{\sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      3. *-commutative68.3%

        \[\leadsto \frac{\sqrt{-3 \cdot \color{blue}{\left(c \cdot a\right)}} - b}{3 \cdot a} \]
    11. Simplified68.3%

      \[\leadsto \frac{\color{blue}{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}}{3 \cdot a} \]
    12. Step-by-step derivation
      1. *-un-lft-identity68.3%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{-3 \cdot \left(c \cdot a\right)} - b}{3 \cdot a}} \]
      2. div-inv68.3%

        \[\leadsto 1 \cdot \color{blue}{\left(\left(\sqrt{-3 \cdot \left(c \cdot a\right)} - b\right) \cdot \frac{1}{3 \cdot a}\right)} \]
      3. *-commutative68.3%

        \[\leadsto 1 \cdot \left(\left(\sqrt{\color{blue}{\left(c \cdot a\right) \cdot -3}} - b\right) \cdot \frac{1}{3 \cdot a}\right) \]
      4. *-commutative68.3%

        \[\leadsto 1 \cdot \left(\left(\sqrt{\color{blue}{\left(a \cdot c\right)} \cdot -3} - b\right) \cdot \frac{1}{3 \cdot a}\right) \]
      5. associate-*l*68.5%

        \[\leadsto 1 \cdot \left(\left(\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}} - b\right) \cdot \frac{1}{3 \cdot a}\right) \]
      6. associate-/r*68.5%

        \[\leadsto 1 \cdot \left(\left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right) \cdot \color{blue}{\frac{\frac{1}{3}}{a}}\right) \]
      7. metadata-eval68.5%

        \[\leadsto 1 \cdot \left(\left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right) \cdot \frac{\color{blue}{0.3333333333333333}}{a}\right) \]
    13. Applied egg-rr68.5%

      \[\leadsto \color{blue}{1 \cdot \left(\left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right) \cdot \frac{0.3333333333333333}{a}\right)} \]
    14. Step-by-step derivation
      1. *-lft-identity68.5%

        \[\leadsto \color{blue}{\left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right) \cdot \frac{0.3333333333333333}{a}} \]
      2. *-commutative68.5%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right)} \]
      3. associate-*l/68.4%

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right)}{a}} \]
      4. associate-*r/68.3%

        \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a}} \]
    15. Simplified68.3%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a}} \]

    if 8.1999999999999998e-106 < b

    1. Initial program 14.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg14.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg14.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*14.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified14.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 88.5%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. *-commutative88.5%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
    7. Simplified88.5%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 68.1% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{-232}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -6.8e-232)
   (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
   (/ (* c -0.5) b)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -6.8e-232) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-6.8d-232)) then
        tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -6.8e-232) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -6.8e-232:
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -6.8e-232)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -6.8e-232)
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -6.8e-232], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{-232}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\

\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.8000000000000004e-232

    1. Initial program 70.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg70.6%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg70.6%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*70.6%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified70.6%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 65.6%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg65.6%

        \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
      2. *-commutative65.6%

        \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
      3. distribute-rgt-neg-in65.6%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
      4. fma-define65.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
      5. associate-*r/65.7%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
      6. metadata-eval65.7%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
    7. Simplified65.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
    8. Taylor expanded in c around 0 67.6%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -6.8000000000000004e-232 < b

    1. Initial program 31.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg31.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg31.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*31.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified31.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Applied egg-rr34.7%

      \[\leadsto \color{blue}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a \cdot -3}} \]
    6. Step-by-step derivation
      1. associate-*r/34.7%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{a \cdot -3}} \]
      2. *-commutative34.7%

        \[\leadsto \frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{\color{blue}{-3 \cdot a}} \]
      3. frac-times34.7%

        \[\leadsto \color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{-3} \cdot \frac{1}{a}} \]
      4. associate-*l/34.7%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a}}{-3}} \]
      5. un-div-inv34.7%

        \[\leadsto \frac{\color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{a}}}{-3} \]
    7. Applied egg-rr34.7%

      \[\leadsto \color{blue}{\frac{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{a}}{-3}} \]
    8. Taylor expanded in b around inf 0.0%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \frac{c \cdot {\left(\sqrt{-3}\right)}^{2}}{b}} \]
    9. Step-by-step derivation
      1. *-commutative0.0%

        \[\leadsto \color{blue}{\frac{c \cdot {\left(\sqrt{-3}\right)}^{2}}{b} \cdot 0.16666666666666666} \]
      2. associate-/l*0.0%

        \[\leadsto \color{blue}{\left(c \cdot \frac{{\left(\sqrt{-3}\right)}^{2}}{b}\right)} \cdot 0.16666666666666666 \]
      3. associate-*l*0.0%

        \[\leadsto \color{blue}{c \cdot \left(\frac{{\left(\sqrt{-3}\right)}^{2}}{b} \cdot 0.16666666666666666\right)} \]
      4. *-commutative0.0%

        \[\leadsto c \cdot \color{blue}{\left(0.16666666666666666 \cdot \frac{{\left(\sqrt{-3}\right)}^{2}}{b}\right)} \]
      5. associate-*r/0.0%

        \[\leadsto c \cdot \color{blue}{\frac{0.16666666666666666 \cdot {\left(\sqrt{-3}\right)}^{2}}{b}} \]
      6. unpow20.0%

        \[\leadsto c \cdot \frac{0.16666666666666666 \cdot \color{blue}{\left(\sqrt{-3} \cdot \sqrt{-3}\right)}}{b} \]
      7. rem-square-sqrt66.9%

        \[\leadsto c \cdot \frac{0.16666666666666666 \cdot \color{blue}{-3}}{b} \]
      8. metadata-eval66.9%

        \[\leadsto c \cdot \frac{\color{blue}{-0.5}}{b} \]
    10. Simplified66.9%

      \[\leadsto \color{blue}{c \cdot \frac{-0.5}{b}} \]
    11. Taylor expanded in c around 0 67.1%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    12. Step-by-step derivation
      1. associate-*r/67.1%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
      2. *-commutative67.1%

        \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
    13. Simplified67.1%

      \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 67.7% accurate, 9.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{-201}:\\ \;\;\;\;\frac{\frac{b \cdot 2}{a}}{-3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1.9e-201) (/ (/ (* b 2.0) a) -3.0) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.9e-201) {
		tmp = ((b * 2.0) / a) / -3.0;
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1.9d-201)) then
        tmp = ((b * 2.0d0) / a) / (-3.0d0)
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.9e-201) {
		tmp = ((b * 2.0) / a) / -3.0;
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1.9e-201:
		tmp = ((b * 2.0) / a) / -3.0
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1.9e-201)
		tmp = Float64(Float64(Float64(b * 2.0) / a) / -3.0);
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1.9e-201)
		tmp = ((b * 2.0) / a) / -3.0;
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1.9e-201], N[(N[(N[(b * 2.0), $MachinePrecision] / a), $MachinePrecision] / -3.0), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{-201}:\\
\;\;\;\;\frac{\frac{b \cdot 2}{a}}{-3}\\

\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.9e-201

    1. Initial program 69.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified69.9%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Applied egg-rr57.2%

      \[\leadsto \color{blue}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a \cdot -3}} \]
    6. Step-by-step derivation
      1. associate-*r/57.3%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{a \cdot -3}} \]
      2. *-commutative57.3%

        \[\leadsto \frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{\color{blue}{-3 \cdot a}} \]
      3. frac-times57.1%

        \[\leadsto \color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{-3} \cdot \frac{1}{a}} \]
      4. associate-*l/57.2%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a}}{-3}} \]
      5. un-div-inv57.3%

        \[\leadsto \frac{\color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{a}}}{-3} \]
    7. Applied egg-rr57.3%

      \[\leadsto \color{blue}{\frac{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{a}}{-3}} \]
    8. Taylor expanded in b around -inf 68.7%

      \[\leadsto \frac{\frac{\color{blue}{2 \cdot b}}{a}}{-3} \]
    9. Step-by-step derivation
      1. *-commutative68.7%

        \[\leadsto \frac{\frac{\color{blue}{b \cdot 2}}{a}}{-3} \]
    10. Simplified68.7%

      \[\leadsto \frac{\frac{\color{blue}{b \cdot 2}}{a}}{-3} \]

    if -1.9e-201 < b

    1. Initial program 33.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg33.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg33.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*33.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified33.8%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Applied egg-rr37.8%

      \[\leadsto \color{blue}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a \cdot -3}} \]
    6. Step-by-step derivation
      1. associate-*r/37.7%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{a \cdot -3}} \]
      2. *-commutative37.7%

        \[\leadsto \frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{\color{blue}{-3 \cdot a}} \]
      3. frac-times37.7%

        \[\leadsto \color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{-3} \cdot \frac{1}{a}} \]
      4. associate-*l/37.7%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a}}{-3}} \]
      5. un-div-inv37.7%

        \[\leadsto \frac{\color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{a}}}{-3} \]
    7. Applied egg-rr37.7%

      \[\leadsto \color{blue}{\frac{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{a}}{-3}} \]
    8. Taylor expanded in b around inf 0.0%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \frac{c \cdot {\left(\sqrt{-3}\right)}^{2}}{b}} \]
    9. Step-by-step derivation
      1. *-commutative0.0%

        \[\leadsto \color{blue}{\frac{c \cdot {\left(\sqrt{-3}\right)}^{2}}{b} \cdot 0.16666666666666666} \]
      2. associate-/l*0.0%

        \[\leadsto \color{blue}{\left(c \cdot \frac{{\left(\sqrt{-3}\right)}^{2}}{b}\right)} \cdot 0.16666666666666666 \]
      3. associate-*l*0.0%

        \[\leadsto \color{blue}{c \cdot \left(\frac{{\left(\sqrt{-3}\right)}^{2}}{b} \cdot 0.16666666666666666\right)} \]
      4. *-commutative0.0%

        \[\leadsto c \cdot \color{blue}{\left(0.16666666666666666 \cdot \frac{{\left(\sqrt{-3}\right)}^{2}}{b}\right)} \]
      5. associate-*r/0.0%

        \[\leadsto c \cdot \color{blue}{\frac{0.16666666666666666 \cdot {\left(\sqrt{-3}\right)}^{2}}{b}} \]
      6. unpow20.0%

        \[\leadsto c \cdot \frac{0.16666666666666666 \cdot \color{blue}{\left(\sqrt{-3} \cdot \sqrt{-3}\right)}}{b} \]
      7. rem-square-sqrt63.8%

        \[\leadsto c \cdot \frac{0.16666666666666666 \cdot \color{blue}{-3}}{b} \]
      8. metadata-eval63.8%

        \[\leadsto c \cdot \frac{\color{blue}{-0.5}}{b} \]
    10. Simplified63.8%

      \[\leadsto \color{blue}{c \cdot \frac{-0.5}{b}} \]
    11. Taylor expanded in c around 0 64.1%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    12. Step-by-step derivation
      1. associate-*r/64.1%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
      2. *-commutative64.1%

        \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
    13. Simplified64.1%

      \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 67.7% accurate, 11.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{-201}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1.9e-201) (/ b (* a -1.5)) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.9e-201) {
		tmp = b / (a * -1.5);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1.9d-201)) then
        tmp = b / (a * (-1.5d0))
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.9e-201) {
		tmp = b / (a * -1.5);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1.9e-201:
		tmp = b / (a * -1.5)
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1.9e-201)
		tmp = Float64(b / Float64(a * -1.5));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1.9e-201)
		tmp = b / (a * -1.5);
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1.9e-201], N[(b / N[(a * -1.5), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{-201}:\\
\;\;\;\;\frac{b}{a \cdot -1.5}\\

\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -0.5}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.9e-201

    1. Initial program 69.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified69.9%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/269.9%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{{\left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}^{0.5}}}{3 \cdot a} \]
      2. associate-*r*69.9%

        \[\leadsto \frac{\left(-b\right) + {\left(b \cdot b - \color{blue}{\left(3 \cdot a\right) \cdot c}\right)}^{0.5}}{3 \cdot a} \]
      3. fma-neg70.0%

        \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left(\mathsf{fma}\left(b, b, -\left(3 \cdot a\right) \cdot c\right)\right)}}^{0.5}}{3 \cdot a} \]
      4. associate-*r*70.0%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, -\color{blue}{3 \cdot \left(a \cdot c\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      5. *-commutative70.0%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, -\color{blue}{\left(a \cdot c\right) \cdot 3}\right)\right)}^{0.5}}{3 \cdot a} \]
      6. distribute-rgt-neg-in70.0%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot \left(-3\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      7. metadata-eval70.0%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot \color{blue}{-3}\right)\right)}^{0.5}}{3 \cdot a} \]
      8. associate-*r*70.0%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      9. pow-to-exp66.8%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)\right) \cdot 0.5}}}{3 \cdot a} \]
    6. Applied egg-rr66.8%

      \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)\right) \cdot 0.5}}}{3 \cdot a} \]
    7. Taylor expanded in b around -inf 68.6%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    8. Step-by-step derivation
      1. *-commutative68.6%

        \[\leadsto \color{blue}{\frac{b}{a} \cdot -0.6666666666666666} \]
      2. associate-*l/68.5%

        \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
      3. associate-/l*68.6%

        \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    9. Simplified68.6%

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    10. Step-by-step derivation
      1. clear-num68.6%

        \[\leadsto b \cdot \color{blue}{\frac{1}{\frac{a}{-0.6666666666666666}}} \]
      2. div-inv68.6%

        \[\leadsto b \cdot \frac{1}{\color{blue}{a \cdot \frac{1}{-0.6666666666666666}}} \]
      3. metadata-eval68.6%

        \[\leadsto b \cdot \frac{1}{a \cdot \color{blue}{-1.5}} \]
      4. un-div-inv68.7%

        \[\leadsto \color{blue}{\frac{b}{a \cdot -1.5}} \]
    11. Applied egg-rr68.7%

      \[\leadsto \color{blue}{\frac{b}{a \cdot -1.5}} \]

    if -1.9e-201 < b

    1. Initial program 33.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg33.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg33.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*33.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified33.8%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Applied egg-rr37.8%

      \[\leadsto \color{blue}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a \cdot -3}} \]
    6. Step-by-step derivation
      1. associate-*r/37.7%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{a \cdot -3}} \]
      2. *-commutative37.7%

        \[\leadsto \frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{\color{blue}{-3 \cdot a}} \]
      3. frac-times37.7%

        \[\leadsto \color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{-3} \cdot \frac{1}{a}} \]
      4. associate-*l/37.7%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a}}{-3}} \]
      5. un-div-inv37.7%

        \[\leadsto \frac{\color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{a}}}{-3} \]
    7. Applied egg-rr37.7%

      \[\leadsto \color{blue}{\frac{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{a}}{-3}} \]
    8. Taylor expanded in b around inf 0.0%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \frac{c \cdot {\left(\sqrt{-3}\right)}^{2}}{b}} \]
    9. Step-by-step derivation
      1. *-commutative0.0%

        \[\leadsto \color{blue}{\frac{c \cdot {\left(\sqrt{-3}\right)}^{2}}{b} \cdot 0.16666666666666666} \]
      2. associate-/l*0.0%

        \[\leadsto \color{blue}{\left(c \cdot \frac{{\left(\sqrt{-3}\right)}^{2}}{b}\right)} \cdot 0.16666666666666666 \]
      3. associate-*l*0.0%

        \[\leadsto \color{blue}{c \cdot \left(\frac{{\left(\sqrt{-3}\right)}^{2}}{b} \cdot 0.16666666666666666\right)} \]
      4. *-commutative0.0%

        \[\leadsto c \cdot \color{blue}{\left(0.16666666666666666 \cdot \frac{{\left(\sqrt{-3}\right)}^{2}}{b}\right)} \]
      5. associate-*r/0.0%

        \[\leadsto c \cdot \color{blue}{\frac{0.16666666666666666 \cdot {\left(\sqrt{-3}\right)}^{2}}{b}} \]
      6. unpow20.0%

        \[\leadsto c \cdot \frac{0.16666666666666666 \cdot \color{blue}{\left(\sqrt{-3} \cdot \sqrt{-3}\right)}}{b} \]
      7. rem-square-sqrt63.8%

        \[\leadsto c \cdot \frac{0.16666666666666666 \cdot \color{blue}{-3}}{b} \]
      8. metadata-eval63.8%

        \[\leadsto c \cdot \frac{\color{blue}{-0.5}}{b} \]
    10. Simplified63.8%

      \[\leadsto \color{blue}{c \cdot \frac{-0.5}{b}} \]
    11. Taylor expanded in c around 0 64.1%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    12. Step-by-step derivation
      1. associate-*r/64.1%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
      2. *-commutative64.1%

        \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
    13. Simplified64.1%

      \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 67.7% accurate, 11.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{-201}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1.9e-201) (/ b (* a -1.5)) (* (/ c b) -0.5)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.9e-201) {
		tmp = b / (a * -1.5);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1.9d-201)) then
        tmp = b / (a * (-1.5d0))
    else
        tmp = (c / b) * (-0.5d0)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.9e-201) {
		tmp = b / (a * -1.5);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1.9e-201:
		tmp = b / (a * -1.5)
	else:
		tmp = (c / b) * -0.5
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1.9e-201)
		tmp = Float64(b / Float64(a * -1.5));
	else
		tmp = Float64(Float64(c / b) * -0.5);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1.9e-201)
		tmp = b / (a * -1.5);
	else
		tmp = (c / b) * -0.5;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1.9e-201], N[(b / N[(a * -1.5), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{-201}:\\
\;\;\;\;\frac{b}{a \cdot -1.5}\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.9e-201

    1. Initial program 69.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified69.9%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/269.9%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{{\left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}^{0.5}}}{3 \cdot a} \]
      2. associate-*r*69.9%

        \[\leadsto \frac{\left(-b\right) + {\left(b \cdot b - \color{blue}{\left(3 \cdot a\right) \cdot c}\right)}^{0.5}}{3 \cdot a} \]
      3. fma-neg70.0%

        \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left(\mathsf{fma}\left(b, b, -\left(3 \cdot a\right) \cdot c\right)\right)}}^{0.5}}{3 \cdot a} \]
      4. associate-*r*70.0%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, -\color{blue}{3 \cdot \left(a \cdot c\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      5. *-commutative70.0%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, -\color{blue}{\left(a \cdot c\right) \cdot 3}\right)\right)}^{0.5}}{3 \cdot a} \]
      6. distribute-rgt-neg-in70.0%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot \left(-3\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      7. metadata-eval70.0%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot \color{blue}{-3}\right)\right)}^{0.5}}{3 \cdot a} \]
      8. associate-*r*70.0%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      9. pow-to-exp66.8%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)\right) \cdot 0.5}}}{3 \cdot a} \]
    6. Applied egg-rr66.8%

      \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)\right) \cdot 0.5}}}{3 \cdot a} \]
    7. Taylor expanded in b around -inf 68.6%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    8. Step-by-step derivation
      1. *-commutative68.6%

        \[\leadsto \color{blue}{\frac{b}{a} \cdot -0.6666666666666666} \]
      2. associate-*l/68.5%

        \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
      3. associate-/l*68.6%

        \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    9. Simplified68.6%

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    10. Step-by-step derivation
      1. clear-num68.6%

        \[\leadsto b \cdot \color{blue}{\frac{1}{\frac{a}{-0.6666666666666666}}} \]
      2. div-inv68.6%

        \[\leadsto b \cdot \frac{1}{\color{blue}{a \cdot \frac{1}{-0.6666666666666666}}} \]
      3. metadata-eval68.6%

        \[\leadsto b \cdot \frac{1}{a \cdot \color{blue}{-1.5}} \]
      4. un-div-inv68.7%

        \[\leadsto \color{blue}{\frac{b}{a \cdot -1.5}} \]
    11. Applied egg-rr68.7%

      \[\leadsto \color{blue}{\frac{b}{a \cdot -1.5}} \]

    if -1.9e-201 < b

    1. Initial program 33.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg33.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg33.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*33.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified33.8%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 64.1%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. *-commutative64.1%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
    7. Simplified64.1%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 13: 67.7% accurate, 11.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{-201}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1.9e-201) (* -0.6666666666666666 (/ b a)) (* (/ c b) -0.5)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.9e-201) {
		tmp = -0.6666666666666666 * (b / a);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1.9d-201)) then
        tmp = (-0.6666666666666666d0) * (b / a)
    else
        tmp = (c / b) * (-0.5d0)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.9e-201) {
		tmp = -0.6666666666666666 * (b / a);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1.9e-201:
		tmp = -0.6666666666666666 * (b / a)
	else:
		tmp = (c / b) * -0.5
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1.9e-201)
		tmp = Float64(-0.6666666666666666 * Float64(b / a));
	else
		tmp = Float64(Float64(c / b) * -0.5);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1.9e-201)
		tmp = -0.6666666666666666 * (b / a);
	else
		tmp = (c / b) * -0.5;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1.9e-201], N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{-201}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.9e-201

    1. Initial program 69.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified69.9%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 68.6%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    6. Step-by-step derivation
      1. *-commutative68.6%

        \[\leadsto \color{blue}{\frac{b}{a} \cdot -0.6666666666666666} \]
    7. Simplified68.6%

      \[\leadsto \color{blue}{\frac{b}{a} \cdot -0.6666666666666666} \]

    if -1.9e-201 < b

    1. Initial program 33.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg33.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg33.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*33.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified33.8%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 64.1%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. *-commutative64.1%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
    7. Simplified64.1%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{-201}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 67.8% accurate, 11.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{-232}:\\ \;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\ \mathbf{else}:\\ \;\;\;\;c \cdot \frac{-0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -6.8e-232) (* b (/ -0.6666666666666666 a)) (* c (/ -0.5 b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -6.8e-232) {
		tmp = b * (-0.6666666666666666 / a);
	} else {
		tmp = c * (-0.5 / b);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-6.8d-232)) then
        tmp = b * ((-0.6666666666666666d0) / a)
    else
        tmp = c * ((-0.5d0) / b)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -6.8e-232) {
		tmp = b * (-0.6666666666666666 / a);
	} else {
		tmp = c * (-0.5 / b);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -6.8e-232:
		tmp = b * (-0.6666666666666666 / a)
	else:
		tmp = c * (-0.5 / b)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -6.8e-232)
		tmp = Float64(b * Float64(-0.6666666666666666 / a));
	else
		tmp = Float64(c * Float64(-0.5 / b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -6.8e-232)
		tmp = b * (-0.6666666666666666 / a);
	else
		tmp = c * (-0.5 / b);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -6.8e-232], N[(b * N[(-0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision], N[(c * N[(-0.5 / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{-232}:\\
\;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\

\mathbf{else}:\\
\;\;\;\;c \cdot \frac{-0.5}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.8000000000000004e-232

    1. Initial program 70.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg70.6%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg70.6%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*70.6%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified70.6%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/270.6%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{{\left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}^{0.5}}}{3 \cdot a} \]
      2. associate-*r*70.6%

        \[\leadsto \frac{\left(-b\right) + {\left(b \cdot b - \color{blue}{\left(3 \cdot a\right) \cdot c}\right)}^{0.5}}{3 \cdot a} \]
      3. fma-neg70.7%

        \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left(\mathsf{fma}\left(b, b, -\left(3 \cdot a\right) \cdot c\right)\right)}}^{0.5}}{3 \cdot a} \]
      4. associate-*r*70.7%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, -\color{blue}{3 \cdot \left(a \cdot c\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      5. *-commutative70.7%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, -\color{blue}{\left(a \cdot c\right) \cdot 3}\right)\right)}^{0.5}}{3 \cdot a} \]
      6. distribute-rgt-neg-in70.7%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot \left(-3\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      7. metadata-eval70.7%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot \color{blue}{-3}\right)\right)}^{0.5}}{3 \cdot a} \]
      8. associate-*r*70.7%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      9. pow-to-exp67.3%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)\right) \cdot 0.5}}}{3 \cdot a} \]
    6. Applied egg-rr67.3%

      \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)\right) \cdot 0.5}}}{3 \cdot a} \]
    7. Taylor expanded in b around -inf 66.5%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    8. Step-by-step derivation
      1. *-commutative66.5%

        \[\leadsto \color{blue}{\frac{b}{a} \cdot -0.6666666666666666} \]
      2. associate-*l/66.4%

        \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
      3. associate-/l*66.5%

        \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    9. Simplified66.5%

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]

    if -6.8000000000000004e-232 < b

    1. Initial program 31.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg31.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg31.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*31.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified31.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Applied egg-rr34.7%

      \[\leadsto \color{blue}{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a \cdot -3}} \]
    6. Step-by-step derivation
      1. associate-*r/34.7%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{a \cdot -3}} \]
      2. *-commutative34.7%

        \[\leadsto \frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot 1}{\color{blue}{-3 \cdot a}} \]
      3. frac-times34.7%

        \[\leadsto \color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{-3} \cdot \frac{1}{a}} \]
      4. associate-*l/34.7%

        \[\leadsto \color{blue}{\frac{\left(b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right) \cdot \frac{1}{a}}{-3}} \]
      5. un-div-inv34.7%

        \[\leadsto \frac{\color{blue}{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{a}}}{-3} \]
    7. Applied egg-rr34.7%

      \[\leadsto \color{blue}{\frac{\frac{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}{a}}{-3}} \]
    8. Taylor expanded in b around inf 0.0%

      \[\leadsto \color{blue}{0.16666666666666666 \cdot \frac{c \cdot {\left(\sqrt{-3}\right)}^{2}}{b}} \]
    9. Step-by-step derivation
      1. *-commutative0.0%

        \[\leadsto \color{blue}{\frac{c \cdot {\left(\sqrt{-3}\right)}^{2}}{b} \cdot 0.16666666666666666} \]
      2. associate-/l*0.0%

        \[\leadsto \color{blue}{\left(c \cdot \frac{{\left(\sqrt{-3}\right)}^{2}}{b}\right)} \cdot 0.16666666666666666 \]
      3. associate-*l*0.0%

        \[\leadsto \color{blue}{c \cdot \left(\frac{{\left(\sqrt{-3}\right)}^{2}}{b} \cdot 0.16666666666666666\right)} \]
      4. *-commutative0.0%

        \[\leadsto c \cdot \color{blue}{\left(0.16666666666666666 \cdot \frac{{\left(\sqrt{-3}\right)}^{2}}{b}\right)} \]
      5. associate-*r/0.0%

        \[\leadsto c \cdot \color{blue}{\frac{0.16666666666666666 \cdot {\left(\sqrt{-3}\right)}^{2}}{b}} \]
      6. unpow20.0%

        \[\leadsto c \cdot \frac{0.16666666666666666 \cdot \color{blue}{\left(\sqrt{-3} \cdot \sqrt{-3}\right)}}{b} \]
      7. rem-square-sqrt66.9%

        \[\leadsto c \cdot \frac{0.16666666666666666 \cdot \color{blue}{-3}}{b} \]
      8. metadata-eval66.9%

        \[\leadsto c \cdot \frac{\color{blue}{-0.5}}{b} \]
    10. Simplified66.9%

      \[\leadsto \color{blue}{c \cdot \frac{-0.5}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 15: 43.1% accurate, 11.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{-199}:\\ \;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -2.9e-199) (* b (/ -0.6666666666666666 a)) (* 0.5 (/ c b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -2.9e-199) {
		tmp = b * (-0.6666666666666666 / a);
	} else {
		tmp = 0.5 * (c / b);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-2.9d-199)) then
        tmp = b * ((-0.6666666666666666d0) / a)
    else
        tmp = 0.5d0 * (c / b)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -2.9e-199) {
		tmp = b * (-0.6666666666666666 / a);
	} else {
		tmp = 0.5 * (c / b);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -2.9e-199:
		tmp = b * (-0.6666666666666666 / a)
	else:
		tmp = 0.5 * (c / b)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -2.9e-199)
		tmp = Float64(b * Float64(-0.6666666666666666 / a));
	else
		tmp = Float64(0.5 * Float64(c / b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -2.9e-199)
		tmp = b * (-0.6666666666666666 / a);
	else
		tmp = 0.5 * (c / b);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -2.9e-199], N[(b * N[(-0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.9 \cdot 10^{-199}:\\
\;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{c}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.9e-199

    1. Initial program 69.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg69.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg69.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*69.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified69.7%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/269.7%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{{\left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}^{0.5}}}{3 \cdot a} \]
      2. associate-*r*69.7%

        \[\leadsto \frac{\left(-b\right) + {\left(b \cdot b - \color{blue}{\left(3 \cdot a\right) \cdot c}\right)}^{0.5}}{3 \cdot a} \]
      3. fma-neg69.8%

        \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left(\mathsf{fma}\left(b, b, -\left(3 \cdot a\right) \cdot c\right)\right)}}^{0.5}}{3 \cdot a} \]
      4. associate-*r*69.7%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, -\color{blue}{3 \cdot \left(a \cdot c\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      5. *-commutative69.7%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, -\color{blue}{\left(a \cdot c\right) \cdot 3}\right)\right)}^{0.5}}{3 \cdot a} \]
      6. distribute-rgt-neg-in69.7%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot \left(-3\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      7. metadata-eval69.7%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot \color{blue}{-3}\right)\right)}^{0.5}}{3 \cdot a} \]
      8. associate-*r*69.7%

        \[\leadsto \frac{\left(-b\right) + {\left(\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)\right)}^{0.5}}{3 \cdot a} \]
      9. pow-to-exp66.6%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)\right) \cdot 0.5}}}{3 \cdot a} \]
    6. Applied egg-rr66.6%

      \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)\right) \cdot 0.5}}}{3 \cdot a} \]
    7. Taylor expanded in b around -inf 69.1%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    8. Step-by-step derivation
      1. *-commutative69.1%

        \[\leadsto \color{blue}{\frac{b}{a} \cdot -0.6666666666666666} \]
      2. associate-*l/69.1%

        \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
      3. associate-/l*69.1%

        \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    9. Simplified69.1%

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]

    if -2.9e-199 < b

    1. Initial program 34.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. sqr-neg34.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. sqr-neg34.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      3. associate-*l*34.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified34.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 2.3%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg2.3%

        \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
      2. *-commutative2.3%

        \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
      3. distribute-rgt-neg-in2.3%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
      4. fma-define2.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
      5. associate-*r/2.3%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
      6. metadata-eval2.3%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
    7. Simplified2.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
    8. Taylor expanded in c around inf 14.2%

      \[\leadsto \color{blue}{0.5 \cdot \frac{c}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 10.8% accurate, 23.2× speedup?

\[\begin{array}{l} \\ 0.5 \cdot \frac{c}{b} \end{array} \]
(FPCore (a b c) :precision binary64 (* 0.5 (/ c b)))
double code(double a, double b, double c) {
	return 0.5 * (c / b);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = 0.5d0 * (c / b)
end function
public static double code(double a, double b, double c) {
	return 0.5 * (c / b);
}
def code(a, b, c):
	return 0.5 * (c / b)
function code(a, b, c)
	return Float64(0.5 * Float64(c / b))
end
function tmp = code(a, b, c)
	tmp = 0.5 * (c / b);
end
code[a_, b_, c_] := N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.5 \cdot \frac{c}{b}
\end{array}
Derivation
  1. Initial program 51.9%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. sqr-neg51.9%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. sqr-neg51.9%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    3. associate-*l*51.9%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
  3. Simplified51.9%

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Taylor expanded in b around -inf 35.4%

    \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
  6. Step-by-step derivation
    1. mul-1-neg35.4%

      \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
    2. *-commutative35.4%

      \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
    3. distribute-rgt-neg-in35.4%

      \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
    4. fma-define35.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
    5. associate-*r/35.5%

      \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
    6. metadata-eval35.5%

      \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
  7. Simplified35.5%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
  8. Taylor expanded in c around inf 9.2%

    \[\leadsto \color{blue}{0.5 \cdot \frac{c}{b}} \]
  9. Add Preprocessing

Reproduce

?
herbie shell --seed 2024107 
(FPCore (a b c)
  :name "Cubic critical"
  :precision binary64
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))