Cubic critical, narrow range

Percentage Accurate: 55.4% → 92.1%
Time: 18.6s
Alternatives: 13
Speedup: 23.2×

Specification

?
\[\left(\left(1.0536712127723509 \cdot 10^{-8} < a \land a < 94906265.62425156\right) \land \left(1.0536712127723509 \cdot 10^{-8} < b \land b < 94906265.62425156\right)\right) \land \left(1.0536712127723509 \cdot 10^{-8} < c \land c < 94906265.62425156\right)\]
\[\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 13 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: 55.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: 92.1% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {b}^{2} - a \cdot \left(3 \cdot c\right)\\ t_1 := \frac{{c}^{4}}{{b}^{8}}\\ t_2 := \frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\\ t_3 := \frac{{c}^{3}}{{b}^{6}}\\ t_4 := \mathsf{fma}\left(-2.25, t_3, t_3 \cdot 0.7734375\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{3} + {t_0}^{1.5}}{{\left(-b\right)}^{2} + \left(t_0 + b \cdot \sqrt{t_0}\right)}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(0.3333333333333333, a \cdot \mathsf{fma}\left(0.5625, \frac{{c}^{2}}{{b}^{3}}, \left(b \cdot 2\right) \cdot t_2\right), 0.3333333333333333 \cdot \left({a}^{2} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{t_2}}, \left(b \cdot 2\right) \cdot t_4\right) + {a}^{3} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{t_4}}, \mathsf{fma}\left(2, b \cdot \mathsf{fma}\left(-5.0625, t_1, \mathsf{fma}\left(-0.31640625, t_1, \mathsf{fma}\left(0.01318359375, t_1, t_1 \cdot 2.3203125\right)\right)\right), b \cdot {t_2}^{2}\right)\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (- (pow b 2.0) (* a (* 3.0 c))))
        (t_1 (/ (pow c 4.0) (pow b 8.0)))
        (t_2 (* (/ (pow c 2.0) (pow b 4.0)) -0.84375))
        (t_3 (/ (pow c 3.0) (pow b 6.0)))
        (t_4 (fma -2.25 t_3 (* t_3 0.7734375))))
   (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -7.0)
     (/
      (/
       (+ (pow (- b) 3.0) (pow t_0 1.5))
       (+ (pow (- b) 2.0) (+ t_0 (* b (sqrt t_0)))))
      (* 3.0 a))
     (fma
      -0.5
      (/ c b)
      (fma
       0.3333333333333333
       (* a (fma 0.5625 (/ (pow c 2.0) (pow b 3.0)) (* (* b 2.0) t_2)))
       (*
        0.3333333333333333
        (+
         (* (pow a 2.0) (fma -1.5 (/ c (/ b t_2)) (* (* b 2.0) t_4)))
         (*
          (pow a 3.0)
          (fma
           -1.5
           (/ c (/ b t_4))
           (fma
            2.0
            (*
             b
             (fma
              -5.0625
              t_1
              (fma -0.31640625 t_1 (fma 0.01318359375 t_1 (* t_1 2.3203125)))))
            (* b (pow t_2 2.0))))))))))))
double code(double a, double b, double c) {
	double t_0 = pow(b, 2.0) - (a * (3.0 * c));
	double t_1 = pow(c, 4.0) / pow(b, 8.0);
	double t_2 = (pow(c, 2.0) / pow(b, 4.0)) * -0.84375;
	double t_3 = pow(c, 3.0) / pow(b, 6.0);
	double t_4 = fma(-2.25, t_3, (t_3 * 0.7734375));
	double tmp;
	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7.0) {
		tmp = ((pow(-b, 3.0) + pow(t_0, 1.5)) / (pow(-b, 2.0) + (t_0 + (b * sqrt(t_0))))) / (3.0 * a);
	} else {
		tmp = fma(-0.5, (c / b), fma(0.3333333333333333, (a * fma(0.5625, (pow(c, 2.0) / pow(b, 3.0)), ((b * 2.0) * t_2))), (0.3333333333333333 * ((pow(a, 2.0) * fma(-1.5, (c / (b / t_2)), ((b * 2.0) * t_4))) + (pow(a, 3.0) * fma(-1.5, (c / (b / t_4)), fma(2.0, (b * fma(-5.0625, t_1, fma(-0.31640625, t_1, fma(0.01318359375, t_1, (t_1 * 2.3203125))))), (b * pow(t_2, 2.0)))))))));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = Float64((b ^ 2.0) - Float64(a * Float64(3.0 * c)))
	t_1 = Float64((c ^ 4.0) / (b ^ 8.0))
	t_2 = Float64(Float64((c ^ 2.0) / (b ^ 4.0)) * -0.84375)
	t_3 = Float64((c ^ 3.0) / (b ^ 6.0))
	t_4 = fma(-2.25, t_3, Float64(t_3 * 0.7734375))
	tmp = 0.0
	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -7.0)
		tmp = Float64(Float64(Float64((Float64(-b) ^ 3.0) + (t_0 ^ 1.5)) / Float64((Float64(-b) ^ 2.0) + Float64(t_0 + Float64(b * sqrt(t_0))))) / Float64(3.0 * a));
	else
		tmp = fma(-0.5, Float64(c / b), fma(0.3333333333333333, Float64(a * fma(0.5625, Float64((c ^ 2.0) / (b ^ 3.0)), Float64(Float64(b * 2.0) * t_2))), Float64(0.3333333333333333 * Float64(Float64((a ^ 2.0) * fma(-1.5, Float64(c / Float64(b / t_2)), Float64(Float64(b * 2.0) * t_4))) + Float64((a ^ 3.0) * fma(-1.5, Float64(c / Float64(b / t_4)), fma(2.0, Float64(b * fma(-5.0625, t_1, fma(-0.31640625, t_1, fma(0.01318359375, t_1, Float64(t_1 * 2.3203125))))), Float64(b * (t_2 ^ 2.0)))))))));
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[Power[b, 2.0], $MachinePrecision] - N[(a * N[(3.0 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[c, 4.0], $MachinePrecision] / N[Power[b, 8.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[c, 2.0], $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision] * -0.84375), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[c, 3.0], $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-2.25 * t$95$3 + N[(t$95$3 * 0.7734375), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -7.0], N[(N[(N[(N[Power[(-b), 3.0], $MachinePrecision] + N[Power[t$95$0, 1.5], $MachinePrecision]), $MachinePrecision] / N[(N[Power[(-b), 2.0], $MachinePrecision] + N[(t$95$0 + N[(b * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision] + N[(0.3333333333333333 * N[(a * N[(0.5625 * N[(N[Power[c, 2.0], $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] + N[(N[(b * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(N[(N[Power[a, 2.0], $MachinePrecision] * N[(-1.5 * N[(c / N[(b / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(b * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[a, 3.0], $MachinePrecision] * N[(-1.5 * N[(c / N[(b / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(b * N[(-5.0625 * t$95$1 + N[(-0.31640625 * t$95$1 + N[(0.01318359375 * t$95$1 + N[(t$95$1 * 2.3203125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {b}^{2} - a \cdot \left(3 \cdot c\right)\\
t_1 := \frac{{c}^{4}}{{b}^{8}}\\
t_2 := \frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\\
t_3 := \frac{{c}^{3}}{{b}^{6}}\\
t_4 := \mathsf{fma}\left(-2.25, t_3, t_3 \cdot 0.7734375\right)\\
\mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\
\;\;\;\;\frac{\frac{{\left(-b\right)}^{3} + {t_0}^{1.5}}{{\left(-b\right)}^{2} + \left(t_0 + b \cdot \sqrt{t_0}\right)}}{3 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(0.3333333333333333, a \cdot \mathsf{fma}\left(0.5625, \frac{{c}^{2}}{{b}^{3}}, \left(b \cdot 2\right) \cdot t_2\right), 0.3333333333333333 \cdot \left({a}^{2} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{t_2}}, \left(b \cdot 2\right) \cdot t_4\right) + {a}^{3} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{t_4}}, \mathsf{fma}\left(2, b \cdot \mathsf{fma}\left(-5.0625, t_1, \mathsf{fma}\left(-0.31640625, t_1, \mathsf{fma}\left(0.01318359375, t_1, t_1 \cdot 2.3203125\right)\right)\right), b \cdot {t_2}^{2}\right)\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -7

    1. Initial program 86.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in a around 0 86.4%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + {\left({\left(\color{blue}{{b}^{2}} - a \cdot \left(c \cdot 3\right)\right)}^{0.5}\right)}^{3}}{\left(-b\right) \cdot \left(-b\right) + \left(\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - \left(-b\right) \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}{3 \cdot a} \]
      4. pow-pow87.5%

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

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

        \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + {\left({b}^{2} - a \cdot \left(c \cdot 3\right)\right)}^{1.5}}{\color{blue}{{\left(-b\right)}^{2}} + \left(\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - \left(-b\right) \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}{3 \cdot a} \]
    6. Applied egg-rr87.6%

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

    if -7 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

    1. Initial program 47.1%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in a around 0 47.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}}, \sqrt{\sqrt{\color{blue}{{b}^{2}} - a \cdot \left(c \cdot 3\right)}}, -b\right)}{3 \cdot a} \]
    6. Applied egg-rr46.7%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}}, \sqrt{\sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}}, -b\right)}}{3 \cdot a} \]
    7. Taylor expanded in a around 0 95.0%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + \left(0.3333333333333333 \cdot \left(a \cdot \left(0.5625 \cdot \frac{{c}^{2}}{{b}^{3}} + 2 \cdot \left(b \cdot \left(-1.125 \cdot \frac{{c}^{2}}{{b}^{4}} + 0.28125 \cdot \frac{{c}^{2}}{{b}^{4}}\right)\right)\right)\right) + \left(0.3333333333333333 \cdot \left({a}^{2} \cdot \left(-1.5 \cdot \frac{c \cdot \left(-1.125 \cdot \frac{{c}^{2}}{{b}^{4}} + 0.28125 \cdot \frac{{c}^{2}}{{b}^{4}}\right)}{b} + 2 \cdot \left(b \cdot \left(-2.25 \cdot \frac{{c}^{3}}{{b}^{6}} + \left(-0.0703125 \cdot \frac{{c}^{3}}{{b}^{6}} + 0.84375 \cdot \frac{{c}^{3}}{{b}^{6}}\right)\right)\right)\right)\right) + 0.3333333333333333 \cdot \left({a}^{3} \cdot \left(-1.5 \cdot \frac{c \cdot \left(-2.25 \cdot \frac{{c}^{3}}{{b}^{6}} + \left(-0.0703125 \cdot \frac{{c}^{3}}{{b}^{6}} + 0.84375 \cdot \frac{{c}^{3}}{{b}^{6}}\right)\right)}{b} + \left(2 \cdot \left(b \cdot \left(-5.0625 \cdot \frac{{c}^{4}}{{b}^{8}} + \left(-0.31640625 \cdot \frac{{c}^{4}}{{b}^{8}} + \left(0.01318359375 \cdot \frac{{c}^{4}}{{b}^{8}} + \left(0.6328125 \cdot \frac{{c}^{4}}{{b}^{8}} + 1.6875 \cdot \frac{{c}^{4}}{{b}^{8}}\right)\right)\right)\right)\right) + b \cdot {\left(-1.125 \cdot \frac{{c}^{2}}{{b}^{4}} + 0.28125 \cdot \frac{{c}^{2}}{{b}^{4}}\right)}^{2}\right)\right)\right)\right)\right)} \]
    8. Simplified95.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(0.3333333333333333, a \cdot \mathsf{fma}\left(0.5625, \frac{{c}^{2}}{{b}^{3}}, \left(2 \cdot b\right) \cdot \left(\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\right)\right), 0.3333333333333333 \cdot \left({a}^{2} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375}}, \left(2 \cdot b\right) \cdot \mathsf{fma}\left(-2.25, \frac{{c}^{3}}{{b}^{6}}, \frac{{c}^{3}}{{b}^{6}} \cdot 0.7734375\right)\right) + {a}^{3} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{\mathsf{fma}\left(-2.25, \frac{{c}^{3}}{{b}^{6}}, \frac{{c}^{3}}{{b}^{6}} \cdot 0.7734375\right)}}, \mathsf{fma}\left(2, b \cdot \mathsf{fma}\left(-5.0625, \frac{{c}^{4}}{{b}^{8}}, \mathsf{fma}\left(-0.31640625, \frac{{c}^{4}}{{b}^{8}}, \mathsf{fma}\left(0.01318359375, \frac{{c}^{4}}{{b}^{8}}, \frac{{c}^{4}}{{b}^{8}} \cdot 2.3203125\right)\right)\right), b \cdot {\left(\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\right)}^{2}\right)\right)\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{3} + {\left({b}^{2} - a \cdot \left(3 \cdot c\right)\right)}^{1.5}}{{\left(-b\right)}^{2} + \left(\left({b}^{2} - a \cdot \left(3 \cdot c\right)\right) + b \cdot \sqrt{{b}^{2} - a \cdot \left(3 \cdot c\right)}\right)}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(0.3333333333333333, a \cdot \mathsf{fma}\left(0.5625, \frac{{c}^{2}}{{b}^{3}}, \left(b \cdot 2\right) \cdot \left(\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\right)\right), 0.3333333333333333 \cdot \left({a}^{2} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375}}, \left(b \cdot 2\right) \cdot \mathsf{fma}\left(-2.25, \frac{{c}^{3}}{{b}^{6}}, \frac{{c}^{3}}{{b}^{6}} \cdot 0.7734375\right)\right) + {a}^{3} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{\mathsf{fma}\left(-2.25, \frac{{c}^{3}}{{b}^{6}}, \frac{{c}^{3}}{{b}^{6}} \cdot 0.7734375\right)}}, \mathsf{fma}\left(2, b \cdot \mathsf{fma}\left(-5.0625, \frac{{c}^{4}}{{b}^{8}}, \mathsf{fma}\left(-0.31640625, \frac{{c}^{4}}{{b}^{8}}, \mathsf{fma}\left(0.01318359375, \frac{{c}^{4}}{{b}^{8}}, \frac{{c}^{4}}{{b}^{8}} \cdot 2.3203125\right)\right)\right), b \cdot {\left(\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\right)}^{2}\right)\right)\right)\right)\right)\\ \end{array} \]

Alternative 2: 92.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {b}^{2} - a \cdot \left(3 \cdot c\right)\\ t_1 := c \cdot {a}^{2}\\ t_2 := -0.75 \cdot t_1 + t_1 \cdot 0.375\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{3} + {t_0}^{1.5}}{{\left(-b\right)}^{2} + \left(t_0 + b \cdot \sqrt{t_0}\right)}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot \left(a \cdot \left(c \cdot t_2\right)\right) + \left(-0.2222222222222222 \cdot \frac{5.0625 \cdot \left({c}^{4} \cdot {a}^{4}\right) + {\left(-1.125 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2}}{a \cdot {c}^{2}} + 0.5625 \cdot \left({c}^{2} \cdot {a}^{3}\right)\right)}{{b}^{5}} + \left(-3 \cdot \frac{t_2}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)\right)}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (- (pow b 2.0) (* a (* 3.0 c))))
        (t_1 (* c (pow a 2.0)))
        (t_2 (+ (* -0.75 t_1) (* t_1 0.375))))
   (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -7.0)
     (/
      (/
       (+ (pow (- b) 3.0) (pow t_0 1.5))
       (+ (pow (- b) 2.0) (+ t_0 (* b (sqrt t_0)))))
      (* 3.0 a))
     (/
      1.0
      (+
       (*
        -3.0
        (/
         (+
          (* -0.75 (* a (* c t_2)))
          (+
           (*
            -0.2222222222222222
            (/
             (+
              (* 5.0625 (* (pow c 4.0) (pow a 4.0)))
              (pow (* -1.125 (* (pow c 2.0) (pow a 2.0))) 2.0))
             (* a (pow c 2.0))))
           (* 0.5625 (* (pow c 2.0) (pow a 3.0)))))
         (pow b 5.0)))
       (+
        (* -3.0 (/ t_2 (pow b 3.0)))
        (+ (* -2.0 (/ b c)) (* 1.5 (/ a b)))))))))
double code(double a, double b, double c) {
	double t_0 = pow(b, 2.0) - (a * (3.0 * c));
	double t_1 = c * pow(a, 2.0);
	double t_2 = (-0.75 * t_1) + (t_1 * 0.375);
	double tmp;
	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7.0) {
		tmp = ((pow(-b, 3.0) + pow(t_0, 1.5)) / (pow(-b, 2.0) + (t_0 + (b * sqrt(t_0))))) / (3.0 * a);
	} else {
		tmp = 1.0 / ((-3.0 * (((-0.75 * (a * (c * t_2))) + ((-0.2222222222222222 * (((5.0625 * (pow(c, 4.0) * pow(a, 4.0))) + pow((-1.125 * (pow(c, 2.0) * pow(a, 2.0))), 2.0)) / (a * pow(c, 2.0)))) + (0.5625 * (pow(c, 2.0) * pow(a, 3.0))))) / pow(b, 5.0))) + ((-3.0 * (t_2 / pow(b, 3.0))) + ((-2.0 * (b / c)) + (1.5 * (a / 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) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = (b ** 2.0d0) - (a * (3.0d0 * c))
    t_1 = c * (a ** 2.0d0)
    t_2 = ((-0.75d0) * t_1) + (t_1 * 0.375d0)
    if (((sqrt(((b * b) - ((3.0d0 * a) * c))) - b) / (3.0d0 * a)) <= (-7.0d0)) then
        tmp = (((-b ** 3.0d0) + (t_0 ** 1.5d0)) / ((-b ** 2.0d0) + (t_0 + (b * sqrt(t_0))))) / (3.0d0 * a)
    else
        tmp = 1.0d0 / (((-3.0d0) * ((((-0.75d0) * (a * (c * t_2))) + (((-0.2222222222222222d0) * (((5.0625d0 * ((c ** 4.0d0) * (a ** 4.0d0))) + (((-1.125d0) * ((c ** 2.0d0) * (a ** 2.0d0))) ** 2.0d0)) / (a * (c ** 2.0d0)))) + (0.5625d0 * ((c ** 2.0d0) * (a ** 3.0d0))))) / (b ** 5.0d0))) + (((-3.0d0) * (t_2 / (b ** 3.0d0))) + (((-2.0d0) * (b / c)) + (1.5d0 * (a / b)))))
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double t_0 = Math.pow(b, 2.0) - (a * (3.0 * c));
	double t_1 = c * Math.pow(a, 2.0);
	double t_2 = (-0.75 * t_1) + (t_1 * 0.375);
	double tmp;
	if (((Math.sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7.0) {
		tmp = ((Math.pow(-b, 3.0) + Math.pow(t_0, 1.5)) / (Math.pow(-b, 2.0) + (t_0 + (b * Math.sqrt(t_0))))) / (3.0 * a);
	} else {
		tmp = 1.0 / ((-3.0 * (((-0.75 * (a * (c * t_2))) + ((-0.2222222222222222 * (((5.0625 * (Math.pow(c, 4.0) * Math.pow(a, 4.0))) + Math.pow((-1.125 * (Math.pow(c, 2.0) * Math.pow(a, 2.0))), 2.0)) / (a * Math.pow(c, 2.0)))) + (0.5625 * (Math.pow(c, 2.0) * Math.pow(a, 3.0))))) / Math.pow(b, 5.0))) + ((-3.0 * (t_2 / Math.pow(b, 3.0))) + ((-2.0 * (b / c)) + (1.5 * (a / b)))));
	}
	return tmp;
}
def code(a, b, c):
	t_0 = math.pow(b, 2.0) - (a * (3.0 * c))
	t_1 = c * math.pow(a, 2.0)
	t_2 = (-0.75 * t_1) + (t_1 * 0.375)
	tmp = 0
	if ((math.sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7.0:
		tmp = ((math.pow(-b, 3.0) + math.pow(t_0, 1.5)) / (math.pow(-b, 2.0) + (t_0 + (b * math.sqrt(t_0))))) / (3.0 * a)
	else:
		tmp = 1.0 / ((-3.0 * (((-0.75 * (a * (c * t_2))) + ((-0.2222222222222222 * (((5.0625 * (math.pow(c, 4.0) * math.pow(a, 4.0))) + math.pow((-1.125 * (math.pow(c, 2.0) * math.pow(a, 2.0))), 2.0)) / (a * math.pow(c, 2.0)))) + (0.5625 * (math.pow(c, 2.0) * math.pow(a, 3.0))))) / math.pow(b, 5.0))) + ((-3.0 * (t_2 / math.pow(b, 3.0))) + ((-2.0 * (b / c)) + (1.5 * (a / b)))))
	return tmp
function code(a, b, c)
	t_0 = Float64((b ^ 2.0) - Float64(a * Float64(3.0 * c)))
	t_1 = Float64(c * (a ^ 2.0))
	t_2 = Float64(Float64(-0.75 * t_1) + Float64(t_1 * 0.375))
	tmp = 0.0
	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -7.0)
		tmp = Float64(Float64(Float64((Float64(-b) ^ 3.0) + (t_0 ^ 1.5)) / Float64((Float64(-b) ^ 2.0) + Float64(t_0 + Float64(b * sqrt(t_0))))) / Float64(3.0 * a));
	else
		tmp = Float64(1.0 / Float64(Float64(-3.0 * Float64(Float64(Float64(-0.75 * Float64(a * Float64(c * t_2))) + Float64(Float64(-0.2222222222222222 * Float64(Float64(Float64(5.0625 * Float64((c ^ 4.0) * (a ^ 4.0))) + (Float64(-1.125 * Float64((c ^ 2.0) * (a ^ 2.0))) ^ 2.0)) / Float64(a * (c ^ 2.0)))) + Float64(0.5625 * Float64((c ^ 2.0) * (a ^ 3.0))))) / (b ^ 5.0))) + Float64(Float64(-3.0 * Float64(t_2 / (b ^ 3.0))) + Float64(Float64(-2.0 * Float64(b / c)) + Float64(1.5 * Float64(a / b))))));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	t_0 = (b ^ 2.0) - (a * (3.0 * c));
	t_1 = c * (a ^ 2.0);
	t_2 = (-0.75 * t_1) + (t_1 * 0.375);
	tmp = 0.0;
	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7.0)
		tmp = (((-b ^ 3.0) + (t_0 ^ 1.5)) / ((-b ^ 2.0) + (t_0 + (b * sqrt(t_0))))) / (3.0 * a);
	else
		tmp = 1.0 / ((-3.0 * (((-0.75 * (a * (c * t_2))) + ((-0.2222222222222222 * (((5.0625 * ((c ^ 4.0) * (a ^ 4.0))) + ((-1.125 * ((c ^ 2.0) * (a ^ 2.0))) ^ 2.0)) / (a * (c ^ 2.0)))) + (0.5625 * ((c ^ 2.0) * (a ^ 3.0))))) / (b ^ 5.0))) + ((-3.0 * (t_2 / (b ^ 3.0))) + ((-2.0 * (b / c)) + (1.5 * (a / b)))));
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[Power[b, 2.0], $MachinePrecision] - N[(a * N[(3.0 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c * N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-0.75 * t$95$1), $MachinePrecision] + N[(t$95$1 * 0.375), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -7.0], N[(N[(N[(N[Power[(-b), 3.0], $MachinePrecision] + N[Power[t$95$0, 1.5], $MachinePrecision]), $MachinePrecision] / N[(N[Power[(-b), 2.0], $MachinePrecision] + N[(t$95$0 + N[(b * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(-3.0 * N[(N[(N[(-0.75 * N[(a * N[(c * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.2222222222222222 * N[(N[(N[(5.0625 * N[(N[Power[c, 4.0], $MachinePrecision] * N[Power[a, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Power[N[(-1.125 * N[(N[Power[c, 2.0], $MachinePrecision] * N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(a * N[Power[c, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5625 * N[(N[Power[c, 2.0], $MachinePrecision] * N[Power[a, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-3.0 * N[(t$95$2 / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {b}^{2} - a \cdot \left(3 \cdot c\right)\\
t_1 := c \cdot {a}^{2}\\
t_2 := -0.75 \cdot t_1 + t_1 \cdot 0.375\\
\mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\
\;\;\;\;\frac{\frac{{\left(-b\right)}^{3} + {t_0}^{1.5}}{{\left(-b\right)}^{2} + \left(t_0 + b \cdot \sqrt{t_0}\right)}}{3 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot \left(a \cdot \left(c \cdot t_2\right)\right) + \left(-0.2222222222222222 \cdot \frac{5.0625 \cdot \left({c}^{4} \cdot {a}^{4}\right) + {\left(-1.125 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2}}{a \cdot {c}^{2}} + 0.5625 \cdot \left({c}^{2} \cdot {a}^{3}\right)\right)}{{b}^{5}} + \left(-3 \cdot \frac{t_2}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -7

    1. Initial program 86.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in a around 0 86.4%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + {\left({\left(\color{blue}{{b}^{2}} - a \cdot \left(c \cdot 3\right)\right)}^{0.5}\right)}^{3}}{\left(-b\right) \cdot \left(-b\right) + \left(\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - \left(-b\right) \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}{3 \cdot a} \]
      4. pow-pow87.5%

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

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

        \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + {\left({b}^{2} - a \cdot \left(c \cdot 3\right)\right)}^{1.5}}{\color{blue}{{\left(-b\right)}^{2}} + \left(\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - \left(-b\right) \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}{3 \cdot a} \]
    6. Applied egg-rr87.6%

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

    if -7 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

    1. Initial program 47.1%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in a around 0 47.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\color{blue}{{b}^{2}} - a \cdot \left(c \cdot 3\right)}\right)}\right)}^{-1} \]
    6. Applied egg-rr47.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3}}} \]
      11. +-commutative47.1%

        \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + \left(-b\right)}}{3}}} \]
      12. sub-neg47.1%

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

      \[\leadsto \color{blue}{\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}} \]
    9. Taylor expanded in b around inf 94.9%

      \[\leadsto \frac{1}{\color{blue}{-3 \cdot \frac{-0.75 \cdot \left(a \cdot \left(c \cdot \left(-0.75 \cdot \left({a}^{2} \cdot c\right) + 0.375 \cdot \left({a}^{2} \cdot c\right)\right)\right)\right) + \left(-0.2222222222222222 \cdot \frac{5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right) + {\left(-1.125 \cdot \left({a}^{2} \cdot {c}^{2}\right)\right)}^{2}}{a \cdot {c}^{2}} + 0.5625 \cdot \left({a}^{3} \cdot {c}^{2}\right)\right)}{{b}^{5}} + \left(-3 \cdot \frac{-0.75 \cdot \left({a}^{2} \cdot c\right) + 0.375 \cdot \left({a}^{2} \cdot c\right)}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{3} + {\left({b}^{2} - a \cdot \left(3 \cdot c\right)\right)}^{1.5}}{{\left(-b\right)}^{2} + \left(\left({b}^{2} - a \cdot \left(3 \cdot c\right)\right) + b \cdot \sqrt{{b}^{2} - a \cdot \left(3 \cdot c\right)}\right)}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot \left(a \cdot \left(c \cdot \left(-0.75 \cdot \left(c \cdot {a}^{2}\right) + \left(c \cdot {a}^{2}\right) \cdot 0.375\right)\right)\right) + \left(-0.2222222222222222 \cdot \frac{5.0625 \cdot \left({c}^{4} \cdot {a}^{4}\right) + {\left(-1.125 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2}}{a \cdot {c}^{2}} + 0.5625 \cdot \left({c}^{2} \cdot {a}^{3}\right)\right)}{{b}^{5}} + \left(-3 \cdot \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + \left(c \cdot {a}^{2}\right) \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)\right)}\\ \end{array} \]

Alternative 3: 92.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {b}^{2} - a \cdot \left(3 \cdot c\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{3} + {t_0}^{1.5}}{{\left(-b\right)}^{2} + \left(t_0 + b \cdot \sqrt{t_0}\right)}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot -1.0546875}{a \cdot {b}^{7}}\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (- (pow b 2.0) (* a (* 3.0 c)))))
   (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -7.0)
     (/
      (/
       (+ (pow (- b) 3.0) (pow t_0 1.5))
       (+ (pow (- b) 2.0) (+ t_0 (* b (sqrt t_0)))))
      (* 3.0 a))
     (+
      (* -0.5625 (/ (* (pow a 2.0) (pow c 3.0)) (pow b 5.0)))
      (+
       (* -0.5 (/ c b))
       (+
        (* -0.375 (/ (* a (pow c 2.0)) (pow b 3.0)))
        (/ (* (pow (* a c) 4.0) -1.0546875) (* a (pow b 7.0)))))))))
double code(double a, double b, double c) {
	double t_0 = pow(b, 2.0) - (a * (3.0 * c));
	double tmp;
	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7.0) {
		tmp = ((pow(-b, 3.0) + pow(t_0, 1.5)) / (pow(-b, 2.0) + (t_0 + (b * sqrt(t_0))))) / (3.0 * a);
	} else {
		tmp = (-0.5625 * ((pow(a, 2.0) * pow(c, 3.0)) / pow(b, 5.0))) + ((-0.5 * (c / b)) + ((-0.375 * ((a * pow(c, 2.0)) / pow(b, 3.0))) + ((pow((a * c), 4.0) * -1.0546875) / (a * pow(b, 7.0)))));
	}
	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) :: t_0
    real(8) :: tmp
    t_0 = (b ** 2.0d0) - (a * (3.0d0 * c))
    if (((sqrt(((b * b) - ((3.0d0 * a) * c))) - b) / (3.0d0 * a)) <= (-7.0d0)) then
        tmp = (((-b ** 3.0d0) + (t_0 ** 1.5d0)) / ((-b ** 2.0d0) + (t_0 + (b * sqrt(t_0))))) / (3.0d0 * a)
    else
        tmp = ((-0.5625d0) * (((a ** 2.0d0) * (c ** 3.0d0)) / (b ** 5.0d0))) + (((-0.5d0) * (c / b)) + (((-0.375d0) * ((a * (c ** 2.0d0)) / (b ** 3.0d0))) + ((((a * c) ** 4.0d0) * (-1.0546875d0)) / (a * (b ** 7.0d0)))))
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double t_0 = Math.pow(b, 2.0) - (a * (3.0 * c));
	double tmp;
	if (((Math.sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7.0) {
		tmp = ((Math.pow(-b, 3.0) + Math.pow(t_0, 1.5)) / (Math.pow(-b, 2.0) + (t_0 + (b * Math.sqrt(t_0))))) / (3.0 * a);
	} else {
		tmp = (-0.5625 * ((Math.pow(a, 2.0) * Math.pow(c, 3.0)) / Math.pow(b, 5.0))) + ((-0.5 * (c / b)) + ((-0.375 * ((a * Math.pow(c, 2.0)) / Math.pow(b, 3.0))) + ((Math.pow((a * c), 4.0) * -1.0546875) / (a * Math.pow(b, 7.0)))));
	}
	return tmp;
}
def code(a, b, c):
	t_0 = math.pow(b, 2.0) - (a * (3.0 * c))
	tmp = 0
	if ((math.sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7.0:
		tmp = ((math.pow(-b, 3.0) + math.pow(t_0, 1.5)) / (math.pow(-b, 2.0) + (t_0 + (b * math.sqrt(t_0))))) / (3.0 * a)
	else:
		tmp = (-0.5625 * ((math.pow(a, 2.0) * math.pow(c, 3.0)) / math.pow(b, 5.0))) + ((-0.5 * (c / b)) + ((-0.375 * ((a * math.pow(c, 2.0)) / math.pow(b, 3.0))) + ((math.pow((a * c), 4.0) * -1.0546875) / (a * math.pow(b, 7.0)))))
	return tmp
function code(a, b, c)
	t_0 = Float64((b ^ 2.0) - Float64(a * Float64(3.0 * c)))
	tmp = 0.0
	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -7.0)
		tmp = Float64(Float64(Float64((Float64(-b) ^ 3.0) + (t_0 ^ 1.5)) / Float64((Float64(-b) ^ 2.0) + Float64(t_0 + Float64(b * sqrt(t_0))))) / Float64(3.0 * a));
	else
		tmp = Float64(Float64(-0.5625 * Float64(Float64((a ^ 2.0) * (c ^ 3.0)) / (b ^ 5.0))) + Float64(Float64(-0.5 * Float64(c / b)) + Float64(Float64(-0.375 * Float64(Float64(a * (c ^ 2.0)) / (b ^ 3.0))) + Float64(Float64((Float64(a * c) ^ 4.0) * -1.0546875) / Float64(a * (b ^ 7.0))))));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	t_0 = (b ^ 2.0) - (a * (3.0 * c));
	tmp = 0.0;
	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7.0)
		tmp = (((-b ^ 3.0) + (t_0 ^ 1.5)) / ((-b ^ 2.0) + (t_0 + (b * sqrt(t_0))))) / (3.0 * a);
	else
		tmp = (-0.5625 * (((a ^ 2.0) * (c ^ 3.0)) / (b ^ 5.0))) + ((-0.5 * (c / b)) + ((-0.375 * ((a * (c ^ 2.0)) / (b ^ 3.0))) + ((((a * c) ^ 4.0) * -1.0546875) / (a * (b ^ 7.0)))));
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[Power[b, 2.0], $MachinePrecision] - N[(a * N[(3.0 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -7.0], N[(N[(N[(N[Power[(-b), 3.0], $MachinePrecision] + N[Power[t$95$0, 1.5], $MachinePrecision]), $MachinePrecision] / N[(N[Power[(-b), 2.0], $MachinePrecision] + N[(t$95$0 + N[(b * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5625 * N[(N[(N[Power[a, 2.0], $MachinePrecision] * N[Power[c, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.375 * N[(N[(a * N[Power[c, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[N[(a * c), $MachinePrecision], 4.0], $MachinePrecision] * -1.0546875), $MachinePrecision] / N[(a * N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {b}^{2} - a \cdot \left(3 \cdot c\right)\\
\mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\
\;\;\;\;\frac{\frac{{\left(-b\right)}^{3} + {t_0}^{1.5}}{{\left(-b\right)}^{2} + \left(t_0 + b \cdot \sqrt{t_0}\right)}}{3 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot -1.0546875}{a \cdot {b}^{7}}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -7

    1. Initial program 86.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in a around 0 86.4%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + {\left({\left(\color{blue}{{b}^{2}} - a \cdot \left(c \cdot 3\right)\right)}^{0.5}\right)}^{3}}{\left(-b\right) \cdot \left(-b\right) + \left(\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - \left(-b\right) \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}{3 \cdot a} \]
      4. pow-pow87.5%

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

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

        \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + {\left({b}^{2} - a \cdot \left(c \cdot 3\right)\right)}^{1.5}}{\color{blue}{{\left(-b\right)}^{2}} + \left(\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - \left(-b\right) \cdot \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}{3 \cdot a} \]
    6. Applied egg-rr87.6%

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

    if -7 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

    1. Initial program 47.1%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 94.9%

      \[\leadsto \color{blue}{-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.16666666666666666 \cdot \frac{5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right) + {\left(-1.125 \cdot \left({a}^{2} \cdot {c}^{2}\right)\right)}^{2}}{a \cdot {b}^{7}}\right)\right)} \]
    3. Taylor expanded in c around 0 94.9%

      \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{-0.16666666666666666 \cdot \frac{{c}^{4} \cdot \left(1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}\right)}{a \cdot {b}^{7}}}\right)\right) \]
    4. Step-by-step derivation
      1. associate-*r/94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{-0.16666666666666666 \cdot \left({c}^{4} \cdot \left(1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}\right)\right)}{a \cdot {b}^{7}}}\right)\right) \]
      2. distribute-rgt-in94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{-0.16666666666666666 \cdot \color{blue}{\left(\left(1.265625 \cdot {a}^{4}\right) \cdot {c}^{4} + \left(5.0625 \cdot {a}^{4}\right) \cdot {c}^{4}\right)}}{a \cdot {b}^{7}}\right)\right) \]
      3. associate-*r*94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{-0.16666666666666666 \cdot \left(\color{blue}{1.265625 \cdot \left({a}^{4} \cdot {c}^{4}\right)} + \left(5.0625 \cdot {a}^{4}\right) \cdot {c}^{4}\right)}{a \cdot {b}^{7}}\right)\right) \]
      4. associate-*r*94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{-0.16666666666666666 \cdot \left(1.265625 \cdot \left({a}^{4} \cdot {c}^{4}\right) + \color{blue}{5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right)}\right)}{a \cdot {b}^{7}}\right)\right) \]
      5. times-frac94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{-0.16666666666666666}{a} \cdot \frac{1.265625 \cdot \left({a}^{4} \cdot {c}^{4}\right) + 5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right)}{{b}^{7}}}\right)\right) \]
    5. Simplified94.9%

      \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{-0.16666666666666666}{a} \cdot \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{{b}^{7}}}\right)\right) \]
    6. Step-by-step derivation
      1. expm1-log1p-u94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{-0.16666666666666666}{a} \cdot \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{{b}^{7}}\right)\right)}\right)\right) \]
      2. expm1-udef94.3%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{-0.16666666666666666}{a} \cdot \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{{b}^{7}}\right)} - 1\right)}\right)\right) \]
      3. clear-num94.3%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{1}{\frac{a}{-0.16666666666666666}}} \cdot \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{{b}^{7}}\right)} - 1\right)\right)\right) \]
      4. associate-/l*94.3%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \left(e^{\mathsf{log1p}\left(\frac{1}{\frac{a}{-0.16666666666666666}} \cdot \color{blue}{\frac{{\left(a \cdot c\right)}^{4}}{\frac{{b}^{7}}{6.328125}}}\right)} - 1\right)\right)\right) \]
      5. frac-times94.3%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{1 \cdot {\left(a \cdot c\right)}^{4}}{\frac{a}{-0.16666666666666666} \cdot \frac{{b}^{7}}{6.328125}}}\right)} - 1\right)\right)\right) \]
      6. *-un-lft-identity94.3%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{{\left(a \cdot c\right)}^{4}}}{\frac{a}{-0.16666666666666666} \cdot \frac{{b}^{7}}{6.328125}}\right)} - 1\right)\right)\right) \]
    7. Applied egg-rr94.3%

      \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{{\left(a \cdot c\right)}^{4}}{\frac{a}{-0.16666666666666666} \cdot \frac{{b}^{7}}{6.328125}}\right)} - 1\right)}\right)\right) \]
    8. Step-by-step derivation
      1. expm1-def94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\left(a \cdot c\right)}^{4}}{\frac{a}{-0.16666666666666666} \cdot \frac{{b}^{7}}{6.328125}}\right)\right)}\right)\right) \]
      2. expm1-log1p94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{{\left(a \cdot c\right)}^{4}}{\frac{a}{-0.16666666666666666} \cdot \frac{{b}^{7}}{6.328125}}}\right)\right) \]
      3. associate-*r/94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4}}{\color{blue}{\frac{\frac{a}{-0.16666666666666666} \cdot {b}^{7}}{6.328125}}}\right)\right) \]
      4. associate-/l*94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{\frac{a}{-0.16666666666666666} \cdot {b}^{7}}}\right)\right) \]
      5. *-commutative94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{\color{blue}{{b}^{7} \cdot \frac{a}{-0.16666666666666666}}}\right)\right) \]
      6. associate-*r/94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{\color{blue}{\frac{{b}^{7} \cdot a}{-0.16666666666666666}}}\right)\right) \]
      7. associate-/l*94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{\left({\left(a \cdot c\right)}^{4} \cdot 6.328125\right) \cdot -0.16666666666666666}{{b}^{7} \cdot a}}\right)\right) \]
      8. associate-*l*94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{\color{blue}{{\left(a \cdot c\right)}^{4} \cdot \left(6.328125 \cdot -0.16666666666666666\right)}}{{b}^{7} \cdot a}\right)\right) \]
      9. metadata-eval94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot \color{blue}{-1.0546875}}{{b}^{7} \cdot a}\right)\right) \]
      10. *-commutative94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot -1.0546875}{\color{blue}{a \cdot {b}^{7}}}\right)\right) \]
    9. Simplified94.9%

      \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{{\left(a \cdot c\right)}^{4} \cdot -1.0546875}{a \cdot {b}^{7}}}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{3} + {\left({b}^{2} - a \cdot \left(3 \cdot c\right)\right)}^{1.5}}{{\left(-b\right)}^{2} + \left(\left({b}^{2} - a \cdot \left(3 \cdot c\right)\right) + b \cdot \sqrt{{b}^{2} - a \cdot \left(3 \cdot c\right)}\right)}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot -1.0546875}{a \cdot {b}^{7}}\right)\right)\\ \end{array} \]

Alternative 4: 92.2% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3}}}\\ \mathbf{else}:\\ \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot -1.0546875}{a \cdot {b}^{7}}\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma a (* c -3.0) (pow b 2.0))))
   (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -7.0)
     (/ 1.0 (/ a (/ (/ (- t_0 (pow b 2.0)) (+ b (sqrt t_0))) 3.0)))
     (+
      (* -0.5625 (/ (* (pow a 2.0) (pow c 3.0)) (pow b 5.0)))
      (+
       (* -0.5 (/ c b))
       (+
        (* -0.375 (/ (* a (pow c 2.0)) (pow b 3.0)))
        (/ (* (pow (* a c) 4.0) -1.0546875) (* a (pow b 7.0)))))))))
double code(double a, double b, double c) {
	double t_0 = fma(a, (c * -3.0), pow(b, 2.0));
	double tmp;
	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7.0) {
		tmp = 1.0 / (a / (((t_0 - pow(b, 2.0)) / (b + sqrt(t_0))) / 3.0));
	} else {
		tmp = (-0.5625 * ((pow(a, 2.0) * pow(c, 3.0)) / pow(b, 5.0))) + ((-0.5 * (c / b)) + ((-0.375 * ((a * pow(c, 2.0)) / pow(b, 3.0))) + ((pow((a * c), 4.0) * -1.0546875) / (a * pow(b, 7.0)))));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(a, Float64(c * -3.0), (b ^ 2.0))
	tmp = 0.0
	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -7.0)
		tmp = Float64(1.0 / Float64(a / Float64(Float64(Float64(t_0 - (b ^ 2.0)) / Float64(b + sqrt(t_0))) / 3.0)));
	else
		tmp = Float64(Float64(-0.5625 * Float64(Float64((a ^ 2.0) * (c ^ 3.0)) / (b ^ 5.0))) + Float64(Float64(-0.5 * Float64(c / b)) + Float64(Float64(-0.375 * Float64(Float64(a * (c ^ 2.0)) / (b ^ 3.0))) + Float64(Float64((Float64(a * c) ^ 4.0) * -1.0546875) / Float64(a * (b ^ 7.0))))));
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(a * N[(c * -3.0), $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -7.0], N[(1.0 / N[(a / N[(N[(N[(t$95$0 - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5625 * N[(N[(N[Power[a, 2.0], $MachinePrecision] * N[Power[c, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.375 * N[(N[(a * N[Power[c, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[N[(a * c), $MachinePrecision], 4.0], $MachinePrecision] * -1.0546875), $MachinePrecision] / N[(a * N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\
\mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\
\;\;\;\;\frac{1}{\frac{a}{\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3}}}\\

\mathbf{else}:\\
\;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot -1.0546875}{a \cdot {b}^{7}}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -7

    1. Initial program 86.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in a around 0 86.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\color{blue}{{b}^{2}} - a \cdot \left(c \cdot 3\right)}\right)}\right)}^{-1} \]
    6. Applied egg-rr86.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3}}} \]
      11. +-commutative86.4%

        \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + \left(-b\right)}}{3}}} \]
      12. sub-neg86.4%

        \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}}{3}}} \]
    8. Simplified86.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}} \]
    9. Step-by-step derivation
      1. flip--85.9%

        \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + b}}}{3}}} \]
      2. add-sqr-sqrt87.4%

        \[\leadsto \frac{1}{\frac{a}{\frac{\frac{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + b}}{3}}} \]
      3. unpow287.4%

        \[\leadsto \frac{1}{\frac{a}{\frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - \color{blue}{{b}^{2}}}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + b}}{3}}} \]
    10. Applied egg-rr87.4%

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

    if -7 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

    1. Initial program 47.1%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 94.9%

      \[\leadsto \color{blue}{-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.16666666666666666 \cdot \frac{5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right) + {\left(-1.125 \cdot \left({a}^{2} \cdot {c}^{2}\right)\right)}^{2}}{a \cdot {b}^{7}}\right)\right)} \]
    3. Taylor expanded in c around 0 94.9%

      \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{-0.16666666666666666 \cdot \frac{{c}^{4} \cdot \left(1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}\right)}{a \cdot {b}^{7}}}\right)\right) \]
    4. Step-by-step derivation
      1. associate-*r/94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{-0.16666666666666666 \cdot \left({c}^{4} \cdot \left(1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}\right)\right)}{a \cdot {b}^{7}}}\right)\right) \]
      2. distribute-rgt-in94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{-0.16666666666666666 \cdot \color{blue}{\left(\left(1.265625 \cdot {a}^{4}\right) \cdot {c}^{4} + \left(5.0625 \cdot {a}^{4}\right) \cdot {c}^{4}\right)}}{a \cdot {b}^{7}}\right)\right) \]
      3. associate-*r*94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{-0.16666666666666666 \cdot \left(\color{blue}{1.265625 \cdot \left({a}^{4} \cdot {c}^{4}\right)} + \left(5.0625 \cdot {a}^{4}\right) \cdot {c}^{4}\right)}{a \cdot {b}^{7}}\right)\right) \]
      4. associate-*r*94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{-0.16666666666666666 \cdot \left(1.265625 \cdot \left({a}^{4} \cdot {c}^{4}\right) + \color{blue}{5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right)}\right)}{a \cdot {b}^{7}}\right)\right) \]
      5. times-frac94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{-0.16666666666666666}{a} \cdot \frac{1.265625 \cdot \left({a}^{4} \cdot {c}^{4}\right) + 5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right)}{{b}^{7}}}\right)\right) \]
    5. Simplified94.9%

      \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{-0.16666666666666666}{a} \cdot \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{{b}^{7}}}\right)\right) \]
    6. Step-by-step derivation
      1. expm1-log1p-u94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{-0.16666666666666666}{a} \cdot \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{{b}^{7}}\right)\right)}\right)\right) \]
      2. expm1-udef94.3%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{-0.16666666666666666}{a} \cdot \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{{b}^{7}}\right)} - 1\right)}\right)\right) \]
      3. clear-num94.3%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{1}{\frac{a}{-0.16666666666666666}}} \cdot \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{{b}^{7}}\right)} - 1\right)\right)\right) \]
      4. associate-/l*94.3%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \left(e^{\mathsf{log1p}\left(\frac{1}{\frac{a}{-0.16666666666666666}} \cdot \color{blue}{\frac{{\left(a \cdot c\right)}^{4}}{\frac{{b}^{7}}{6.328125}}}\right)} - 1\right)\right)\right) \]
      5. frac-times94.3%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{1 \cdot {\left(a \cdot c\right)}^{4}}{\frac{a}{-0.16666666666666666} \cdot \frac{{b}^{7}}{6.328125}}}\right)} - 1\right)\right)\right) \]
      6. *-un-lft-identity94.3%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{{\left(a \cdot c\right)}^{4}}}{\frac{a}{-0.16666666666666666} \cdot \frac{{b}^{7}}{6.328125}}\right)} - 1\right)\right)\right) \]
    7. Applied egg-rr94.3%

      \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{{\left(a \cdot c\right)}^{4}}{\frac{a}{-0.16666666666666666} \cdot \frac{{b}^{7}}{6.328125}}\right)} - 1\right)}\right)\right) \]
    8. Step-by-step derivation
      1. expm1-def94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\left(a \cdot c\right)}^{4}}{\frac{a}{-0.16666666666666666} \cdot \frac{{b}^{7}}{6.328125}}\right)\right)}\right)\right) \]
      2. expm1-log1p94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{{\left(a \cdot c\right)}^{4}}{\frac{a}{-0.16666666666666666} \cdot \frac{{b}^{7}}{6.328125}}}\right)\right) \]
      3. associate-*r/94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4}}{\color{blue}{\frac{\frac{a}{-0.16666666666666666} \cdot {b}^{7}}{6.328125}}}\right)\right) \]
      4. associate-/l*94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{\frac{a}{-0.16666666666666666} \cdot {b}^{7}}}\right)\right) \]
      5. *-commutative94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{\color{blue}{{b}^{7} \cdot \frac{a}{-0.16666666666666666}}}\right)\right) \]
      6. associate-*r/94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{\color{blue}{\frac{{b}^{7} \cdot a}{-0.16666666666666666}}}\right)\right) \]
      7. associate-/l*94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{\left({\left(a \cdot c\right)}^{4} \cdot 6.328125\right) \cdot -0.16666666666666666}{{b}^{7} \cdot a}}\right)\right) \]
      8. associate-*l*94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{\color{blue}{{\left(a \cdot c\right)}^{4} \cdot \left(6.328125 \cdot -0.16666666666666666\right)}}{{b}^{7} \cdot a}\right)\right) \]
      9. metadata-eval94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot \color{blue}{-1.0546875}}{{b}^{7} \cdot a}\right)\right) \]
      10. *-commutative94.9%

        \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot -1.0546875}{\color{blue}{a \cdot {b}^{7}}}\right)\right) \]
    9. Simplified94.9%

      \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{\frac{{\left(a \cdot c\right)}^{4} \cdot -1.0546875}{a \cdot {b}^{7}}}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3}}}\\ \mathbf{else}:\\ \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{{\left(a \cdot c\right)}^{4} \cdot -1.0546875}{a \cdot {b}^{7}}\right)\right)\\ \end{array} \]

Alternative 5: 89.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\ t_1 := c \cdot {a}^{2}\\ \mathbf{if}\;b \leq 6.4:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot t_1 + t_1 \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma a (* c -3.0) (pow b 2.0))) (t_1 (* c (pow a 2.0))))
   (if (<= b 6.4)
     (/ 1.0 (/ a (/ (/ (- t_0 (pow b 2.0)) (+ b (sqrt t_0))) 3.0)))
     (/
      1.0
      (+
       (* -3.0 (/ (+ (* -0.75 t_1) (* t_1 0.375)) (pow b 3.0)))
       (+ (* -2.0 (/ b c)) (* 1.5 (/ a b))))))))
double code(double a, double b, double c) {
	double t_0 = fma(a, (c * -3.0), pow(b, 2.0));
	double t_1 = c * pow(a, 2.0);
	double tmp;
	if (b <= 6.4) {
		tmp = 1.0 / (a / (((t_0 - pow(b, 2.0)) / (b + sqrt(t_0))) / 3.0));
	} else {
		tmp = 1.0 / ((-3.0 * (((-0.75 * t_1) + (t_1 * 0.375)) / pow(b, 3.0))) + ((-2.0 * (b / c)) + (1.5 * (a / b))));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(a, Float64(c * -3.0), (b ^ 2.0))
	t_1 = Float64(c * (a ^ 2.0))
	tmp = 0.0
	if (b <= 6.4)
		tmp = Float64(1.0 / Float64(a / Float64(Float64(Float64(t_0 - (b ^ 2.0)) / Float64(b + sqrt(t_0))) / 3.0)));
	else
		tmp = Float64(1.0 / Float64(Float64(-3.0 * Float64(Float64(Float64(-0.75 * t_1) + Float64(t_1 * 0.375)) / (b ^ 3.0))) + Float64(Float64(-2.0 * Float64(b / c)) + Float64(1.5 * Float64(a / b)))));
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(a * N[(c * -3.0), $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c * N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 6.4], N[(1.0 / N[(a / N[(N[(N[(t$95$0 - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(-3.0 * N[(N[(N[(-0.75 * t$95$1), $MachinePrecision] + N[(t$95$1 * 0.375), $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\
t_1 := c \cdot {a}^{2}\\
\mathbf{if}\;b \leq 6.4:\\
\;\;\;\;\frac{1}{\frac{a}{\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot t_1 + t_1 \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\


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

    1. Initial program 82.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in a around 0 82.5%

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}\right)}^{-1} \]
      6. pow282.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + \left(-b\right)}}{3}}} \]
      12. sub-neg82.5%

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

      \[\leadsto \color{blue}{\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}} \]
    9. Step-by-step derivation
      1. flip--82.3%

        \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + b}}}{3}}} \]
      2. add-sqr-sqrt83.5%

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

        \[\leadsto \frac{1}{\frac{a}{\frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - \color{blue}{{b}^{2}}}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + b}}{3}}} \]
    10. Applied egg-rr83.5%

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

    if 6.4000000000000004 < b

    1. Initial program 44.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in a around 0 44.9%

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}\right)}^{-1} \]
      6. pow244.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{a \cdot \left(c \cdot \color{blue}{-3}\right) + {b}^{2}}}{3}}} \]
      10. fma-udef44.9%

        \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3}}} \]
      11. +-commutative44.9%

        \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + \left(-b\right)}}{3}}} \]
      12. sub-neg44.9%

        \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}}{3}}} \]
    8. Simplified44.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}} \]
    9. Taylor expanded in b around inf 94.2%

      \[\leadsto \frac{1}{\color{blue}{-3 \cdot \frac{-0.75 \cdot \left({a}^{2} \cdot c\right) + 0.375 \cdot \left({a}^{2} \cdot c\right)}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 6.4:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + \left(c \cdot {a}^{2}\right) \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\ \end{array} \]

Alternative 6: 89.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\ t_1 := c \cdot {a}^{2}\\ \mathbf{if}\;b \leq 6.4:\\ \;\;\;\;\frac{\frac{t_0 - {b}^{2}}{a}}{3 \cdot \left(b + \sqrt{t_0}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot t_1 + t_1 \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma a (* c -3.0) (pow b 2.0))) (t_1 (* c (pow a 2.0))))
   (if (<= b 6.4)
     (/ (/ (- t_0 (pow b 2.0)) a) (* 3.0 (+ b (sqrt t_0))))
     (/
      1.0
      (+
       (* -3.0 (/ (+ (* -0.75 t_1) (* t_1 0.375)) (pow b 3.0)))
       (+ (* -2.0 (/ b c)) (* 1.5 (/ a b))))))))
double code(double a, double b, double c) {
	double t_0 = fma(a, (c * -3.0), pow(b, 2.0));
	double t_1 = c * pow(a, 2.0);
	double tmp;
	if (b <= 6.4) {
		tmp = ((t_0 - pow(b, 2.0)) / a) / (3.0 * (b + sqrt(t_0)));
	} else {
		tmp = 1.0 / ((-3.0 * (((-0.75 * t_1) + (t_1 * 0.375)) / pow(b, 3.0))) + ((-2.0 * (b / c)) + (1.5 * (a / b))));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(a, Float64(c * -3.0), (b ^ 2.0))
	t_1 = Float64(c * (a ^ 2.0))
	tmp = 0.0
	if (b <= 6.4)
		tmp = Float64(Float64(Float64(t_0 - (b ^ 2.0)) / a) / Float64(3.0 * Float64(b + sqrt(t_0))));
	else
		tmp = Float64(1.0 / Float64(Float64(-3.0 * Float64(Float64(Float64(-0.75 * t_1) + Float64(t_1 * 0.375)) / (b ^ 3.0))) + Float64(Float64(-2.0 * Float64(b / c)) + Float64(1.5 * Float64(a / b)))));
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(a * N[(c * -3.0), $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c * N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 6.4], N[(N[(N[(t$95$0 - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / N[(3.0 * N[(b + N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(-3.0 * N[(N[(N[(-0.75 * t$95$1), $MachinePrecision] + N[(t$95$1 * 0.375), $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\
t_1 := c \cdot {a}^{2}\\
\mathbf{if}\;b \leq 6.4:\\
\;\;\;\;\frac{\frac{t_0 - {b}^{2}}{a}}{3 \cdot \left(b + \sqrt{t_0}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot t_1 + t_1 \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\


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

    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. Simplified82.5%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)} - b}{3 \cdot a}} \]
      2. Step-by-step derivation
        1. fma-udef82.5%

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right) \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}} - b}{3 \cdot a} \]
        8. pow1/380.2%

          \[\leadsto \frac{\color{blue}{{\left(\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right) \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right)}^{0.3333333333333333}} - b}{3 \cdot a} \]
        9. pow380.1%

          \[\leadsto \frac{{\color{blue}{\left({\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right)}^{3}\right)}}^{0.3333333333333333} - b}{3 \cdot a} \]
        10. sqrt-pow280.1%

          \[\leadsto \frac{{\color{blue}{\left({\left(\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)\right)}^{\left(\frac{3}{2}\right)}\right)}}^{0.3333333333333333} - b}{3 \cdot a} \]
        11. fma-udef80.2%

          \[\leadsto \frac{{\left({\color{blue}{\left(b \cdot b + c \cdot \left(a \cdot -3\right)\right)}}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
        12. +-commutative80.2%

          \[\leadsto \frac{{\left({\color{blue}{\left(c \cdot \left(a \cdot -3\right) + b \cdot b\right)}}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
        13. *-commutative80.2%

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

          \[\leadsto \frac{{\left({\left(\color{blue}{a \cdot \left(-3 \cdot c\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
        15. *-commutative80.2%

          \[\leadsto \frac{{\left({\left(a \cdot \color{blue}{\left(c \cdot -3\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
        16. fma-udef80.2%

          \[\leadsto \frac{{\left({\color{blue}{\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
        17. pow280.2%

          \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
        18. metadata-eval80.2%

          \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{1.5}}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
      3. Applied egg-rr80.2%

        \[\leadsto \frac{\color{blue}{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}\right)}^{0.3333333333333333}} - b}{3 \cdot a} \]
      4. Step-by-step derivation
        1. unpow1/381.0%

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

        \[\leadsto \frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b}{3 \cdot a} \]
      6. Step-by-step derivation
        1. add-cube-cbrt80.8%

          \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} - b}{3 \cdot a}} \cdot \sqrt[3]{\frac{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} - b}{3 \cdot a}}\right) \cdot \sqrt[3]{\frac{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} - b}{3 \cdot a}}} \]
        2. pow380.8%

          \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} - b}{3 \cdot a}}\right)}^{3}} \]
        3. pow1/380.3%

          \[\leadsto {\left(\sqrt[3]{\frac{\color{blue}{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}\right)}^{0.3333333333333333}} - b}{3 \cdot a}}\right)}^{3} \]
        4. pow-pow82.3%

          \[\leadsto {\left(\sqrt[3]{\frac{\color{blue}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} - b}{3 \cdot a}}\right)}^{3} \]
        5. metadata-eval82.3%

          \[\leadsto {\left(\sqrt[3]{\frac{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{0.5}} - b}{3 \cdot a}}\right)}^{3} \]
        6. pow1/282.3%

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

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{a \cdot 3}}\right)}^{3}} \]
      8. Step-by-step derivation
        1. rem-cube-cbrt82.5%

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

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

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

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

          \[\leadsto \color{blue}{\frac{\left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b \cdot b\right) \cdot \frac{1}{a}}{\left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + b\right) \cdot 3}} \]
        6. add-sqr-sqrt83.4%

          \[\leadsto \frac{\left(\color{blue}{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b \cdot b\right) \cdot \frac{1}{a}}{\left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + b\right) \cdot 3} \]
        7. unpow283.4%

          \[\leadsto \frac{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - \color{blue}{{b}^{2}}\right) \cdot \frac{1}{a}}{\left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + b\right) \cdot 3} \]
      9. Applied egg-rr83.4%

        \[\leadsto \color{blue}{\frac{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}\right) \cdot \frac{1}{a}}{\left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + b\right) \cdot 3}} \]
      10. Step-by-step derivation
        1. associate-*r/83.4%

          \[\leadsto \frac{\color{blue}{\frac{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}\right) \cdot 1}{a}}}{\left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + b\right) \cdot 3} \]
        2. *-rgt-identity83.4%

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

          \[\leadsto \frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{a}}{\color{blue}{3 \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + b\right)}} \]
        4. +-commutative83.4%

          \[\leadsto \frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{a}}{3 \cdot \color{blue}{\left(b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}\right)}} \]
      11. Simplified83.4%

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

      if 6.4000000000000004 < b

      1. Initial program 44.9%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. Taylor expanded in a around 0 44.9%

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

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

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

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

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

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

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

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

          \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}\right)}^{-1} \]
        6. pow244.9%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{a \cdot \left(c \cdot \color{blue}{-3}\right) + {b}^{2}}}{3}}} \]
        10. fma-udef44.9%

          \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3}}} \]
        11. +-commutative44.9%

          \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + \left(-b\right)}}{3}}} \]
        12. sub-neg44.9%

          \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}}{3}}} \]
      8. Simplified44.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}} \]
      9. Taylor expanded in b around inf 94.2%

        \[\leadsto \frac{1}{\color{blue}{-3 \cdot \frac{-0.75 \cdot \left({a}^{2} \cdot c\right) + 0.375 \cdot \left({a}^{2} \cdot c\right)}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification92.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 6.4:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{a}}{3 \cdot \left(b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + \left(c \cdot {a}^{2}\right) \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\ \end{array} \]

    Alternative 7: 89.7% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := c \cdot {a}^{2}\\ t_1 := a \cdot \left(3 \cdot c\right)\\ \mathbf{if}\;b \leq 6.4:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{2} + \left(t_1 - {b}^{2}\right)}{\left(-b\right) - \sqrt{{b}^{2} - t_1}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot t_0 + t_0 \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\ \end{array} \end{array} \]
    (FPCore (a b c)
     :precision binary64
     (let* ((t_0 (* c (pow a 2.0))) (t_1 (* a (* 3.0 c))))
       (if (<= b 6.4)
         (/
          (/
           (+ (pow (- b) 2.0) (- t_1 (pow b 2.0)))
           (- (- b) (sqrt (- (pow b 2.0) t_1))))
          (* 3.0 a))
         (/
          1.0
          (+
           (* -3.0 (/ (+ (* -0.75 t_0) (* t_0 0.375)) (pow b 3.0)))
           (+ (* -2.0 (/ b c)) (* 1.5 (/ a b))))))))
    double code(double a, double b, double c) {
    	double t_0 = c * pow(a, 2.0);
    	double t_1 = a * (3.0 * c);
    	double tmp;
    	if (b <= 6.4) {
    		tmp = ((pow(-b, 2.0) + (t_1 - pow(b, 2.0))) / (-b - sqrt((pow(b, 2.0) - t_1)))) / (3.0 * a);
    	} else {
    		tmp = 1.0 / ((-3.0 * (((-0.75 * t_0) + (t_0 * 0.375)) / pow(b, 3.0))) + ((-2.0 * (b / c)) + (1.5 * (a / 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) :: t_0
        real(8) :: t_1
        real(8) :: tmp
        t_0 = c * (a ** 2.0d0)
        t_1 = a * (3.0d0 * c)
        if (b <= 6.4d0) then
            tmp = (((-b ** 2.0d0) + (t_1 - (b ** 2.0d0))) / (-b - sqrt(((b ** 2.0d0) - t_1)))) / (3.0d0 * a)
        else
            tmp = 1.0d0 / (((-3.0d0) * ((((-0.75d0) * t_0) + (t_0 * 0.375d0)) / (b ** 3.0d0))) + (((-2.0d0) * (b / c)) + (1.5d0 * (a / b))))
        end if
        code = tmp
    end function
    
    public static double code(double a, double b, double c) {
    	double t_0 = c * Math.pow(a, 2.0);
    	double t_1 = a * (3.0 * c);
    	double tmp;
    	if (b <= 6.4) {
    		tmp = ((Math.pow(-b, 2.0) + (t_1 - Math.pow(b, 2.0))) / (-b - Math.sqrt((Math.pow(b, 2.0) - t_1)))) / (3.0 * a);
    	} else {
    		tmp = 1.0 / ((-3.0 * (((-0.75 * t_0) + (t_0 * 0.375)) / Math.pow(b, 3.0))) + ((-2.0 * (b / c)) + (1.5 * (a / b))));
    	}
    	return tmp;
    }
    
    def code(a, b, c):
    	t_0 = c * math.pow(a, 2.0)
    	t_1 = a * (3.0 * c)
    	tmp = 0
    	if b <= 6.4:
    		tmp = ((math.pow(-b, 2.0) + (t_1 - math.pow(b, 2.0))) / (-b - math.sqrt((math.pow(b, 2.0) - t_1)))) / (3.0 * a)
    	else:
    		tmp = 1.0 / ((-3.0 * (((-0.75 * t_0) + (t_0 * 0.375)) / math.pow(b, 3.0))) + ((-2.0 * (b / c)) + (1.5 * (a / b))))
    	return tmp
    
    function code(a, b, c)
    	t_0 = Float64(c * (a ^ 2.0))
    	t_1 = Float64(a * Float64(3.0 * c))
    	tmp = 0.0
    	if (b <= 6.4)
    		tmp = Float64(Float64(Float64((Float64(-b) ^ 2.0) + Float64(t_1 - (b ^ 2.0))) / Float64(Float64(-b) - sqrt(Float64((b ^ 2.0) - t_1)))) / Float64(3.0 * a));
    	else
    		tmp = Float64(1.0 / Float64(Float64(-3.0 * Float64(Float64(Float64(-0.75 * t_0) + Float64(t_0 * 0.375)) / (b ^ 3.0))) + Float64(Float64(-2.0 * Float64(b / c)) + Float64(1.5 * Float64(a / b)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, c)
    	t_0 = c * (a ^ 2.0);
    	t_1 = a * (3.0 * c);
    	tmp = 0.0;
    	if (b <= 6.4)
    		tmp = (((-b ^ 2.0) + (t_1 - (b ^ 2.0))) / (-b - sqrt(((b ^ 2.0) - t_1)))) / (3.0 * a);
    	else
    		tmp = 1.0 / ((-3.0 * (((-0.75 * t_0) + (t_0 * 0.375)) / (b ^ 3.0))) + ((-2.0 * (b / c)) + (1.5 * (a / b))));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, c_] := Block[{t$95$0 = N[(c * N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(a * N[(3.0 * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 6.4], N[(N[(N[(N[Power[(-b), 2.0], $MachinePrecision] + N[(t$95$1 - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[((-b) - N[Sqrt[N[(N[Power[b, 2.0], $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(-3.0 * N[(N[(N[(-0.75 * t$95$0), $MachinePrecision] + N[(t$95$0 * 0.375), $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := c \cdot {a}^{2}\\
    t_1 := a \cdot \left(3 \cdot c\right)\\
    \mathbf{if}\;b \leq 6.4:\\
    \;\;\;\;\frac{\frac{{\left(-b\right)}^{2} + \left(t_1 - {b}^{2}\right)}{\left(-b\right) - \sqrt{{b}^{2} - t_1}}}{3 \cdot a}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot t_0 + t_0 \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 6.4000000000000004

      1. Initial program 82.5%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. Taylor expanded in a around 0 82.5%

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

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

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

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

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

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

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

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

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

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

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

      if 6.4000000000000004 < b

      1. Initial program 44.9%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. Taylor expanded in a around 0 44.9%

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

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

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

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

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

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

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

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

          \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}\right)}^{-1} \]
        6. pow244.9%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{a \cdot \left(c \cdot \color{blue}{-3}\right) + {b}^{2}}}{3}}} \]
        10. fma-udef44.9%

          \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3}}} \]
        11. +-commutative44.9%

          \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + \left(-b\right)}}{3}}} \]
        12. sub-neg44.9%

          \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}}{3}}} \]
      8. Simplified44.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}} \]
      9. Taylor expanded in b around inf 94.2%

        \[\leadsto \frac{1}{\color{blue}{-3 \cdot \frac{-0.75 \cdot \left({a}^{2} \cdot c\right) + 0.375 \cdot \left({a}^{2} \cdot c\right)}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification92.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 6.4:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{2} + \left(a \cdot \left(3 \cdot c\right) - {b}^{2}\right)}{\left(-b\right) - \sqrt{{b}^{2} - a \cdot \left(3 \cdot c\right)}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + \left(c \cdot {a}^{2}\right) \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\ \end{array} \]

    Alternative 8: 89.4% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := c \cdot {a}^{2}\\ \mathbf{if}\;b \leq 6.4:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot t_0 + t_0 \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\ \end{array} \end{array} \]
    (FPCore (a b c)
     :precision binary64
     (let* ((t_0 (* c (pow a 2.0))))
       (if (<= b 6.4)
         (/ (- (sqrt (fma b b (* c (* a -3.0)))) b) (* 3.0 a))
         (/
          1.0
          (+
           (* -3.0 (/ (+ (* -0.75 t_0) (* t_0 0.375)) (pow b 3.0)))
           (+ (* -2.0 (/ b c)) (* 1.5 (/ a b))))))))
    double code(double a, double b, double c) {
    	double t_0 = c * pow(a, 2.0);
    	double tmp;
    	if (b <= 6.4) {
    		tmp = (sqrt(fma(b, b, (c * (a * -3.0)))) - b) / (3.0 * a);
    	} else {
    		tmp = 1.0 / ((-3.0 * (((-0.75 * t_0) + (t_0 * 0.375)) / pow(b, 3.0))) + ((-2.0 * (b / c)) + (1.5 * (a / b))));
    	}
    	return tmp;
    }
    
    function code(a, b, c)
    	t_0 = Float64(c * (a ^ 2.0))
    	tmp = 0.0
    	if (b <= 6.4)
    		tmp = Float64(Float64(sqrt(fma(b, b, Float64(c * Float64(a * -3.0)))) - b) / Float64(3.0 * a));
    	else
    		tmp = Float64(1.0 / Float64(Float64(-3.0 * Float64(Float64(Float64(-0.75 * t_0) + Float64(t_0 * 0.375)) / (b ^ 3.0))) + Float64(Float64(-2.0 * Float64(b / c)) + Float64(1.5 * Float64(a / b)))));
    	end
    	return tmp
    end
    
    code[a_, b_, c_] := Block[{t$95$0 = N[(c * N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 6.4], N[(N[(N[Sqrt[N[(b * b + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(-3.0 * N[(N[(N[(-0.75 * t$95$0), $MachinePrecision] + N[(t$95$0 * 0.375), $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := c \cdot {a}^{2}\\
    \mathbf{if}\;b \leq 6.4:\\
    \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot t_0 + t_0 \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 6.4000000000000004

      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. Simplified82.7%

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

        if 6.4000000000000004 < b

        1. Initial program 44.9%

          \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
        2. Taylor expanded in a around 0 44.9%

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

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

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

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

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

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

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

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

            \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}\right)}^{-1} \]
          6. pow244.9%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{a \cdot \left(c \cdot \color{blue}{-3}\right) + {b}^{2}}}{3}}} \]
          10. fma-udef44.9%

            \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3}}} \]
          11. +-commutative44.9%

            \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + \left(-b\right)}}{3}}} \]
          12. sub-neg44.9%

            \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}}{3}}} \]
        8. Simplified44.9%

          \[\leadsto \color{blue}{\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}} \]
        9. Taylor expanded in b around inf 94.2%

          \[\leadsto \frac{1}{\color{blue}{-3 \cdot \frac{-0.75 \cdot \left({a}^{2} \cdot c\right) + 0.375 \cdot \left({a}^{2} \cdot c\right)}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification92.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 6.4:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-3 \cdot \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + \left(c \cdot {a}^{2}\right) \cdot 0.375}{{b}^{3}} + \left(-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}\right)}\\ \end{array} \]

      Alternative 9: 85.5% accurate, 0.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 6.5:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}\\ \end{array} \end{array} \]
      (FPCore (a b c)
       :precision binary64
       (if (<= b 6.5)
         (/ (- (sqrt (fma b b (* c (* a -3.0)))) b) (* 3.0 a))
         (/ 1.0 (+ (* -2.0 (/ b c)) (* 1.5 (/ a b))))))
      double code(double a, double b, double c) {
      	double tmp;
      	if (b <= 6.5) {
      		tmp = (sqrt(fma(b, b, (c * (a * -3.0)))) - b) / (3.0 * a);
      	} else {
      		tmp = 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)));
      	}
      	return tmp;
      }
      
      function code(a, b, c)
      	tmp = 0.0
      	if (b <= 6.5)
      		tmp = Float64(Float64(sqrt(fma(b, b, Float64(c * Float64(a * -3.0)))) - b) / Float64(3.0 * a));
      	else
      		tmp = Float64(1.0 / Float64(Float64(-2.0 * Float64(b / c)) + Float64(1.5 * Float64(a / b))));
      	end
      	return tmp
      end
      
      code[a_, b_, c_] := If[LessEqual[b, 6.5], N[(N[(N[Sqrt[N[(b * b + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;b \leq 6.5:\\
      \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 6.5

        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. Simplified82.7%

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

          if 6.5 < b

          1. Initial program 44.9%

            \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
          2. Taylor expanded in a around 0 44.9%

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

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

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

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

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

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

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

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

              \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}\right)}^{-1} \]
            6. pow244.9%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{a \cdot \left(c \cdot \color{blue}{-3}\right) + {b}^{2}}}{3}}} \]
            10. fma-udef44.9%

              \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3}}} \]
            11. +-commutative44.9%

              \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + \left(-b\right)}}{3}}} \]
            12. sub-neg44.9%

              \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}}{3}}} \]
          8. Simplified44.9%

            \[\leadsto \color{blue}{\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}} \]
          9. Taylor expanded in a around 0 90.2%

            \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification89.1%

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 6.5:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}\\ \end{array} \]

        Alternative 10: 85.5% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 6.5:\\ \;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(3 \cdot c\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}\\ \end{array} \end{array} \]
        (FPCore (a b c)
         :precision binary64
         (if (<= b 6.5)
           (/ (- (sqrt (- (* b b) (* a (* 3.0 c)))) b) (* 3.0 a))
           (/ 1.0 (+ (* -2.0 (/ b c)) (* 1.5 (/ a b))))))
        double code(double a, double b, double c) {
        	double tmp;
        	if (b <= 6.5) {
        		tmp = (sqrt(((b * b) - (a * (3.0 * c)))) - b) / (3.0 * a);
        	} else {
        		tmp = 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / 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.5d0) then
                tmp = (sqrt(((b * b) - (a * (3.0d0 * c)))) - b) / (3.0d0 * a)
            else
                tmp = 1.0d0 / (((-2.0d0) * (b / c)) + (1.5d0 * (a / b)))
            end if
            code = tmp
        end function
        
        public static double code(double a, double b, double c) {
        	double tmp;
        	if (b <= 6.5) {
        		tmp = (Math.sqrt(((b * b) - (a * (3.0 * c)))) - b) / (3.0 * a);
        	} else {
        		tmp = 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)));
        	}
        	return tmp;
        }
        
        def code(a, b, c):
        	tmp = 0
        	if b <= 6.5:
        		tmp = (math.sqrt(((b * b) - (a * (3.0 * c)))) - b) / (3.0 * a)
        	else:
        		tmp = 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)))
        	return tmp
        
        function code(a, b, c)
        	tmp = 0.0
        	if (b <= 6.5)
        		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(a * Float64(3.0 * c)))) - b) / Float64(3.0 * a));
        	else
        		tmp = Float64(1.0 / Float64(Float64(-2.0 * Float64(b / c)) + Float64(1.5 * Float64(a / b))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, b, c)
        	tmp = 0.0;
        	if (b <= 6.5)
        		tmp = (sqrt(((b * b) - (a * (3.0 * c)))) - b) / (3.0 * a);
        	else
        		tmp = 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)));
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, b_, c_] := If[LessEqual[b, 6.5], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(a * N[(3.0 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;b \leq 6.5:\\
        \;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(3 \cdot c\right)} - b}{3 \cdot a}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if b < 6.5

          1. Initial program 82.5%

            \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
          2. Taylor expanded in a around 0 82.5%

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

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

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

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

          if 6.5 < b

          1. Initial program 44.9%

            \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
          2. Taylor expanded in a around 0 44.9%

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

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

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

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

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

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

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

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

              \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)}\right)}}\right)}^{-1} \]
            6. pow244.9%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{a \cdot \left(c \cdot \color{blue}{-3}\right) + {b}^{2}}}{3}}} \]
            10. fma-udef44.9%

              \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3}}} \]
            11. +-commutative44.9%

              \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + \left(-b\right)}}{3}}} \]
            12. sub-neg44.9%

              \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}}{3}}} \]
          8. Simplified44.9%

            \[\leadsto \color{blue}{\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}} \]
          9. Taylor expanded in a around 0 90.2%

            \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification89.1%

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 6.5:\\ \;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(3 \cdot c\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}\\ \end{array} \]

        Alternative 11: 82.0% accurate, 8.9× speedup?

        \[\begin{array}{l} \\ \frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}} \end{array} \]
        (FPCore (a b c)
         :precision binary64
         (/ 1.0 (+ (* -2.0 (/ b c)) (* 1.5 (/ a b)))))
        double code(double a, double b, double c) {
        	return 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)));
        }
        
        real(8) function code(a, b, c)
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8), intent (in) :: c
            code = 1.0d0 / (((-2.0d0) * (b / c)) + (1.5d0 * (a / b)))
        end function
        
        public static double code(double a, double b, double c) {
        	return 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)));
        }
        
        def code(a, b, c):
        	return 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)))
        
        function code(a, b, c)
        	return Float64(1.0 / Float64(Float64(-2.0 * Float64(b / c)) + Float64(1.5 * Float64(a / b))))
        end
        
        function tmp = code(a, b, c)
        	tmp = 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)));
        end
        
        code[a_, b_, c_] := N[(1.0 / N[(N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}
        \end{array}
        
        Derivation
        1. Initial program 50.3%

          \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
        2. Taylor expanded in a around 0 50.3%

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

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

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

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

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

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

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

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

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

            \[\leadsto {\left(\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\color{blue}{{b}^{2}} - a \cdot \left(c \cdot 3\right)}\right)}\right)}^{-1} \]
        6. Applied egg-rr50.3%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{1}{\frac{a}{\frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3}}} \]
          11. +-commutative50.3%

            \[\leadsto \frac{1}{\frac{a}{\frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} + \left(-b\right)}}{3}}} \]
          12. sub-neg50.3%

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

          \[\leadsto \color{blue}{\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}} \]
        9. Taylor expanded in a around 0 85.7%

          \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}} \]
        10. Final simplification85.7%

          \[\leadsto \frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}} \]

        Alternative 12: 64.4% 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 50.3%

          \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
        2. Taylor expanded in b around inf 68.9%

          \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
        3. Final simplification68.9%

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

        Alternative 13: 3.2% accurate, 116.0× speedup?

        \[\begin{array}{l} \\ 0 \end{array} \]
        (FPCore (a b c) :precision binary64 0.0)
        double code(double a, double b, double c) {
        	return 0.0;
        }
        
        real(8) function code(a, b, c)
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8), intent (in) :: c
            code = 0.0d0
        end function
        
        public static double code(double a, double b, double c) {
        	return 0.0;
        }
        
        def code(a, b, c):
        	return 0.0
        
        function code(a, b, c)
        	return 0.0
        end
        
        function tmp = code(a, b, c)
        	tmp = 0.0;
        end
        
        code[a_, b_, c_] := 0.0
        
        \begin{array}{l}
        
        \\
        0
        \end{array}
        
        Derivation
        1. Initial program 50.3%

          \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
        2. Taylor expanded in a around 0 50.3%

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(-1, b, \sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}\right) \cdot \frac{1}{\color{blue}{a \cdot 3}} \]
        6. Applied egg-rr50.3%

          \[\leadsto \color{blue}{\mathsf{fma}\left(-1, b, \sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}\right) \cdot \frac{1}{a \cdot 3}} \]
        7. Step-by-step derivation
          1. inv-pow50.3%

            \[\leadsto \mathsf{fma}\left(-1, b, \sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}\right) \cdot \color{blue}{{\left(a \cdot 3\right)}^{-1}} \]
          2. add-sqr-sqrt50.3%

            \[\leadsto \mathsf{fma}\left(-1, b, \sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}\right) \cdot {\color{blue}{\left(\sqrt{a \cdot 3} \cdot \sqrt{a \cdot 3}\right)}}^{-1} \]
          3. unpow-prod-down50.3%

            \[\leadsto \mathsf{fma}\left(-1, b, \sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}\right) \cdot \color{blue}{\left({\left(\sqrt{a \cdot 3}\right)}^{-1} \cdot {\left(\sqrt{a \cdot 3}\right)}^{-1}\right)} \]
        8. Applied egg-rr50.3%

          \[\leadsto \mathsf{fma}\left(-1, b, \sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}\right) \cdot \color{blue}{\left({\left(\sqrt{a \cdot 3}\right)}^{-1} \cdot {\left(\sqrt{a \cdot 3}\right)}^{-1}\right)} \]
        9. Step-by-step derivation
          1. pow-sqr50.3%

            \[\leadsto \mathsf{fma}\left(-1, b, \sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}\right) \cdot \color{blue}{{\left(\sqrt{a \cdot 3}\right)}^{\left(2 \cdot -1\right)}} \]
          2. metadata-eval50.3%

            \[\leadsto \mathsf{fma}\left(-1, b, \sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}\right) \cdot {\left(\sqrt{a \cdot 3}\right)}^{\color{blue}{-2}} \]
        10. Simplified50.3%

          \[\leadsto \mathsf{fma}\left(-1, b, \sqrt{{b}^{2} - a \cdot \left(c \cdot 3\right)}\right) \cdot \color{blue}{{\left(\sqrt{a \cdot 3}\right)}^{-2}} \]
        11. Taylor expanded in a around 0 3.2%

          \[\leadsto \color{blue}{\frac{b + -1 \cdot b}{a \cdot {\left(\sqrt{3}\right)}^{2}}} \]
        12. Step-by-step derivation
          1. distribute-rgt1-in3.2%

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

            \[\leadsto \frac{\color{blue}{0} \cdot b}{a \cdot {\left(\sqrt{3}\right)}^{2}} \]
          3. associate-*r/3.2%

            \[\leadsto \color{blue}{0 \cdot \frac{b}{a \cdot {\left(\sqrt{3}\right)}^{2}}} \]
          4. mul0-lft3.2%

            \[\leadsto \color{blue}{0} \]
        13. Simplified3.2%

          \[\leadsto \color{blue}{0} \]
        14. Final simplification3.2%

          \[\leadsto 0 \]

        Reproduce

        ?
        herbie shell --seed 2023320 
        (FPCore (a b c)
          :name "Cubic critical, narrow range"
          :precision binary64
          :pre (and (and (and (< 1.0536712127723509e-8 a) (< a 94906265.62425156)) (and (< 1.0536712127723509e-8 b) (< b 94906265.62425156))) (and (< 1.0536712127723509e-8 c) (< c 94906265.62425156)))
          (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))