Cubic critical, narrow range

Percentage Accurate: 55.6% → 92.0%
Time: 16.1s
Alternatives: 20
Speedup: 2.9×

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 20 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.6% 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.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\\ t_1 := c \cdot \left(c \cdot c\right)\\ t_2 := b \cdot \left(b \cdot b\right)\\ t_3 := \sqrt{t\_0}\\ t_4 := \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, t\_3, t\_0\right)\right)\\ t_5 := b \cdot t\_2\\ \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{\frac{\frac{t\_2}{t\_4} - \frac{t\_0 \cdot t\_3}{t\_4}}{a}}{-3}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(a, \mathsf{fma}\left(t\_1, \frac{-0.5625}{b \cdot t\_5}, \frac{t\_1 \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{t\_2 \cdot t\_5}\right), \frac{\left(c \cdot c\right) \cdot -0.375}{t\_2}\right), a, \frac{c}{b \cdot -2}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma c (* a -3.0) (* b b)))
        (t_1 (* c (* c c)))
        (t_2 (* b (* b b)))
        (t_3 (sqrt t_0))
        (t_4 (fma b b (fma b t_3 t_0)))
        (t_5 (* b t_2)))
   (if (<= b 0.005)
     (/ (/ (- (/ t_2 t_4) (/ (* t_0 t_3) t_4)) a) -3.0)
     (fma
      (fma
       a
       (fma
        t_1
        (/ -0.5625 (* b t_5))
        (/ (* t_1 (* c (* a -1.0546875))) (* t_2 t_5)))
       (/ (* (* c c) -0.375) t_2))
      a
      (/ c (* b -2.0))))))
double code(double a, double b, double c) {
	double t_0 = fma(c, (a * -3.0), (b * b));
	double t_1 = c * (c * c);
	double t_2 = b * (b * b);
	double t_3 = sqrt(t_0);
	double t_4 = fma(b, b, fma(b, t_3, t_0));
	double t_5 = b * t_2;
	double tmp;
	if (b <= 0.005) {
		tmp = (((t_2 / t_4) - ((t_0 * t_3) / t_4)) / a) / -3.0;
	} else {
		tmp = fma(fma(a, fma(t_1, (-0.5625 / (b * t_5)), ((t_1 * (c * (a * -1.0546875))) / (t_2 * t_5))), (((c * c) * -0.375) / t_2)), a, (c / (b * -2.0)));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(c, Float64(a * -3.0), Float64(b * b))
	t_1 = Float64(c * Float64(c * c))
	t_2 = Float64(b * Float64(b * b))
	t_3 = sqrt(t_0)
	t_4 = fma(b, b, fma(b, t_3, t_0))
	t_5 = Float64(b * t_2)
	tmp = 0.0
	if (b <= 0.005)
		tmp = Float64(Float64(Float64(Float64(t_2 / t_4) - Float64(Float64(t_0 * t_3) / t_4)) / a) / -3.0);
	else
		tmp = fma(fma(a, fma(t_1, Float64(-0.5625 / Float64(b * t_5)), Float64(Float64(t_1 * Float64(c * Float64(a * -1.0546875))) / Float64(t_2 * t_5))), Float64(Float64(Float64(c * c) * -0.375) / t_2)), a, Float64(c / Float64(b * -2.0)));
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(c * N[(a * -3.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c * N[(c * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[t$95$0], $MachinePrecision]}, Block[{t$95$4 = N[(b * b + N[(b * t$95$3 + t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(b * t$95$2), $MachinePrecision]}, If[LessEqual[b, 0.005], N[(N[(N[(N[(t$95$2 / t$95$4), $MachinePrecision] - N[(N[(t$95$0 * t$95$3), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / -3.0), $MachinePrecision], N[(N[(a * N[(t$95$1 * N[(-0.5625 / N[(b * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(c * N[(a * -1.0546875), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(c * c), $MachinePrecision] * -0.375), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * a + N[(c / N[(b * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\\
t_1 := c \cdot \left(c \cdot c\right)\\
t_2 := b \cdot \left(b \cdot b\right)\\
t_3 := \sqrt{t\_0}\\
t_4 := \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, t\_3, t\_0\right)\right)\\
t_5 := b \cdot t\_2\\
\mathbf{if}\;b \leq 0.005:\\
\;\;\;\;\frac{\frac{\frac{t\_2}{t\_4} - \frac{t\_0 \cdot t\_3}{t\_4}}{a}}{-3}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(a, \mathsf{fma}\left(t\_1, \frac{-0.5625}{b \cdot t\_5}, \frac{t\_1 \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{t\_2 \cdot t\_5}\right), \frac{\left(c \cdot c\right) \cdot -0.375}{t\_2}\right), a, \frac{c}{b \cdot -2}\right)\\


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

    1. Initial program 93.3%

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

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

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

    if 0.0050000000000000001 < b

    1. Initial program 47.3%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b} + a \cdot \left(\frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{3}} + a \cdot \left(\frac{-9}{16} \cdot \frac{{c}^{3}}{{b}^{5}} + \frac{-1}{6} \cdot \frac{a \cdot \left(\frac{81}{64} \cdot \frac{{c}^{4}}{{b}^{6}} + \frac{81}{16} \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{b}\right)\right)} \]
    4. Applied rewrites95.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, \mathsf{fma}\left(a, \mathsf{fma}\left(\frac{\frac{{c}^{4}}{{b}^{6}} \cdot \left(6.328125 \cdot a\right)}{b}, -0.16666666666666666, \frac{\left(c \cdot \left(c \cdot c\right)\right) \cdot -0.5625}{{b}^{5}}\right), \frac{\left(c \cdot c\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), -0.5 \cdot \frac{c}{b}\right)} \]
    5. Applied rewrites95.1%

      \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(\mathsf{fma}\left(c, \left(c \cdot c\right) \cdot \frac{-0.5625}{\left(b \cdot b\right) \cdot \left(b \cdot \left(b \cdot b\right)\right)}, \frac{\left(c \cdot \left(c \cdot \left(c \cdot c\right)\right)\right) \cdot \left(6.328125 \cdot a\right)}{\left(\left(b \cdot b\right) \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)\right) \cdot b} \cdot -0.16666666666666666\right), \color{blue}{a}, \frac{\left(c \cdot c\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), -0.5 \cdot \frac{c}{b}\right) \]
    6. Applied rewrites95.0%

      \[\leadsto \mathsf{fma}\left(\frac{-0.5}{b}, \color{blue}{c}, a \cdot \mathsf{fma}\left(c, \frac{c \cdot -0.375}{b \cdot \left(b \cdot b\right)}, a \cdot \mathsf{fma}\left(c, \frac{\left(c \cdot c\right) \cdot -0.5625}{b \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}, \frac{\left(c \cdot \left(c \cdot \left(c \cdot c\right)\right)\right) \cdot \left(\left(6.328125 \cdot a\right) \cdot -0.16666666666666666\right)}{\left(b \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}\right)\right)\right) \]
    7. Applied rewrites95.1%

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(a, \mathsf{fma}\left(c \cdot \left(c \cdot c\right), \frac{-0.5625}{b \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}, \frac{\left(c \cdot \left(c \cdot c\right)\right) \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{\left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right) \cdot \left(b \cdot \left(b \cdot b\right)\right)}\right), \frac{\left(c \cdot c\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), \color{blue}{a}, \frac{c}{b \cdot -2}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification95.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{\frac{\frac{b \cdot \left(b \cdot b\right)}{\mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} - \frac{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{\mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)}}{a}}{-3}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(a, \mathsf{fma}\left(c \cdot \left(c \cdot c\right), \frac{-0.5625}{b \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}, \frac{\left(c \cdot \left(c \cdot c\right)\right) \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{\left(b \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}\right), \frac{\left(c \cdot c\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), a, \frac{c}{b \cdot -2}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 92.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\\ t_1 := \sqrt{t\_0}\\ t_2 := b \cdot \left(b \cdot b\right)\\ t_3 := c \cdot \left(c \cdot c\right)\\ t_4 := b \cdot t\_2\\ \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{t\_2 - \mathsf{fma}\left(c \cdot \left(a \cdot -3\right), t\_1, \left(b \cdot b\right) \cdot t\_1\right)}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, t\_1, t\_0\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(a, \mathsf{fma}\left(t\_3, \frac{-0.5625}{b \cdot t\_4}, \frac{t\_3 \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{t\_2 \cdot t\_4}\right), \frac{\left(c \cdot c\right) \cdot -0.375}{t\_2}\right), a, \frac{c}{b \cdot -2}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma c (* a -3.0) (* b b)))
        (t_1 (sqrt t_0))
        (t_2 (* b (* b b)))
        (t_3 (* c (* c c)))
        (t_4 (* b t_2)))
   (if (<= b 0.005)
     (/
      (- t_2 (fma (* c (* a -3.0)) t_1 (* (* b b) t_1)))
      (* (* a -3.0) (fma b b (fma b t_1 t_0))))
     (fma
      (fma
       a
       (fma
        t_3
        (/ -0.5625 (* b t_4))
        (/ (* t_3 (* c (* a -1.0546875))) (* t_2 t_4)))
       (/ (* (* c c) -0.375) t_2))
      a
      (/ c (* b -2.0))))))
double code(double a, double b, double c) {
	double t_0 = fma(c, (a * -3.0), (b * b));
	double t_1 = sqrt(t_0);
	double t_2 = b * (b * b);
	double t_3 = c * (c * c);
	double t_4 = b * t_2;
	double tmp;
	if (b <= 0.005) {
		tmp = (t_2 - fma((c * (a * -3.0)), t_1, ((b * b) * t_1))) / ((a * -3.0) * fma(b, b, fma(b, t_1, t_0)));
	} else {
		tmp = fma(fma(a, fma(t_3, (-0.5625 / (b * t_4)), ((t_3 * (c * (a * -1.0546875))) / (t_2 * t_4))), (((c * c) * -0.375) / t_2)), a, (c / (b * -2.0)));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(c, Float64(a * -3.0), Float64(b * b))
	t_1 = sqrt(t_0)
	t_2 = Float64(b * Float64(b * b))
	t_3 = Float64(c * Float64(c * c))
	t_4 = Float64(b * t_2)
	tmp = 0.0
	if (b <= 0.005)
		tmp = Float64(Float64(t_2 - fma(Float64(c * Float64(a * -3.0)), t_1, Float64(Float64(b * b) * t_1))) / Float64(Float64(a * -3.0) * fma(b, b, fma(b, t_1, t_0))));
	else
		tmp = fma(fma(a, fma(t_3, Float64(-0.5625 / Float64(b * t_4)), Float64(Float64(t_3 * Float64(c * Float64(a * -1.0546875))) / Float64(t_2 * t_4))), Float64(Float64(Float64(c * c) * -0.375) / t_2)), a, Float64(c / Float64(b * -2.0)));
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(c * N[(a * -3.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c * N[(c * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(b * t$95$2), $MachinePrecision]}, If[LessEqual[b, 0.005], N[(N[(t$95$2 - N[(N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision] * t$95$1 + N[(N[(b * b), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a * -3.0), $MachinePrecision] * N[(b * b + N[(b * t$95$1 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(t$95$3 * N[(-0.5625 / N[(b * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 * N[(c * N[(a * -1.0546875), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(c * c), $MachinePrecision] * -0.375), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * a + N[(c / N[(b * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\\
t_1 := \sqrt{t\_0}\\
t_2 := b \cdot \left(b \cdot b\right)\\
t_3 := c \cdot \left(c \cdot c\right)\\
t_4 := b \cdot t\_2\\
\mathbf{if}\;b \leq 0.005:\\
\;\;\;\;\frac{t\_2 - \mathsf{fma}\left(c \cdot \left(a \cdot -3\right), t\_1, \left(b \cdot b\right) \cdot t\_1\right)}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, t\_1, t\_0\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(a, \mathsf{fma}\left(t\_3, \frac{-0.5625}{b \cdot t\_4}, \frac{t\_3 \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{t\_2 \cdot t\_4}\right), \frac{\left(c \cdot c\right) \cdot -0.375}{t\_2}\right), a, \frac{c}{b \cdot -2}\right)\\


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

    1. Initial program 93.3%

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

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

      \[\leadsto \color{blue}{\frac{b \cdot \left(b \cdot b\right) - \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \color{blue}{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
      2. *-commutativeN/A

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

        \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \color{blue}{\left(c \cdot \left(a \cdot -3\right) + b \cdot b\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
      4. distribute-rgt-inN/A

        \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \color{blue}{\left(\left(c \cdot \left(a \cdot -3\right)\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} + \left(b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \color{blue}{\mathsf{fma}\left(c \cdot \left(a \cdot -3\right), \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \left(b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
      6. lower-*.f64N/A

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

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

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

    if 0.0050000000000000001 < b

    1. Initial program 47.3%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b} + a \cdot \left(\frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{3}} + a \cdot \left(\frac{-9}{16} \cdot \frac{{c}^{3}}{{b}^{5}} + \frac{-1}{6} \cdot \frac{a \cdot \left(\frac{81}{64} \cdot \frac{{c}^{4}}{{b}^{6}} + \frac{81}{16} \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{b}\right)\right)} \]
    4. Applied rewrites95.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, \mathsf{fma}\left(a, \mathsf{fma}\left(\frac{\frac{{c}^{4}}{{b}^{6}} \cdot \left(6.328125 \cdot a\right)}{b}, -0.16666666666666666, \frac{\left(c \cdot \left(c \cdot c\right)\right) \cdot -0.5625}{{b}^{5}}\right), \frac{\left(c \cdot c\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), -0.5 \cdot \frac{c}{b}\right)} \]
    5. Applied rewrites95.1%

      \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(\mathsf{fma}\left(c, \left(c \cdot c\right) \cdot \frac{-0.5625}{\left(b \cdot b\right) \cdot \left(b \cdot \left(b \cdot b\right)\right)}, \frac{\left(c \cdot \left(c \cdot \left(c \cdot c\right)\right)\right) \cdot \left(6.328125 \cdot a\right)}{\left(\left(b \cdot b\right) \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)\right) \cdot b} \cdot -0.16666666666666666\right), \color{blue}{a}, \frac{\left(c \cdot c\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), -0.5 \cdot \frac{c}{b}\right) \]
    6. Applied rewrites95.0%

      \[\leadsto \mathsf{fma}\left(\frac{-0.5}{b}, \color{blue}{c}, a \cdot \mathsf{fma}\left(c, \frac{c \cdot -0.375}{b \cdot \left(b \cdot b\right)}, a \cdot \mathsf{fma}\left(c, \frac{\left(c \cdot c\right) \cdot -0.5625}{b \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}, \frac{\left(c \cdot \left(c \cdot \left(c \cdot c\right)\right)\right) \cdot \left(\left(6.328125 \cdot a\right) \cdot -0.16666666666666666\right)}{\left(b \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}\right)\right)\right) \]
    7. Applied rewrites95.1%

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(a, \mathsf{fma}\left(c \cdot \left(c \cdot c\right), \frac{-0.5625}{b \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}, \frac{\left(c \cdot \left(c \cdot c\right)\right) \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{\left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right) \cdot \left(b \cdot \left(b \cdot b\right)\right)}\right), \frac{\left(c \cdot c\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), \color{blue}{a}, \frac{c}{b \cdot -2}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification95.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{b \cdot \left(b \cdot b\right) - \mathsf{fma}\left(c \cdot \left(a \cdot -3\right), \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \left(b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(a, \mathsf{fma}\left(c \cdot \left(c \cdot c\right), \frac{-0.5625}{b \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}, \frac{\left(c \cdot \left(c \cdot c\right)\right) \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{\left(b \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}\right), \frac{\left(c \cdot c\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), a, \frac{c}{b \cdot -2}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 91.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\\ t_1 := \sqrt{t\_0}\\ t_2 := b \cdot \left(b \cdot b\right)\\ t_3 := b \cdot t\_2\\ \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{t\_2 - \mathsf{fma}\left(c \cdot \left(a \cdot -3\right), t\_1, \left(b \cdot b\right) \cdot t\_1\right)}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, t\_1, t\_0\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-0.5}{b}, c, a \cdot \mathsf{fma}\left(c, \frac{c \cdot -0.375}{t\_2}, a \cdot \mathsf{fma}\left(\frac{c \cdot \left(c \cdot -0.5625\right)}{b \cdot t\_3}, c, \frac{\left(c \cdot \left(c \cdot c\right)\right) \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{t\_2 \cdot t\_3}\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma c (* a -3.0) (* b b)))
        (t_1 (sqrt t_0))
        (t_2 (* b (* b b)))
        (t_3 (* b t_2)))
   (if (<= b 0.005)
     (/
      (- t_2 (fma (* c (* a -3.0)) t_1 (* (* b b) t_1)))
      (* (* a -3.0) (fma b b (fma b t_1 t_0))))
     (fma
      (/ -0.5 b)
      c
      (*
       a
       (fma
        c
        (/ (* c -0.375) t_2)
        (*
         a
         (fma
          (/ (* c (* c -0.5625)) (* b t_3))
          c
          (/ (* (* c (* c c)) (* c (* a -1.0546875))) (* t_2 t_3))))))))))
double code(double a, double b, double c) {
	double t_0 = fma(c, (a * -3.0), (b * b));
	double t_1 = sqrt(t_0);
	double t_2 = b * (b * b);
	double t_3 = b * t_2;
	double tmp;
	if (b <= 0.005) {
		tmp = (t_2 - fma((c * (a * -3.0)), t_1, ((b * b) * t_1))) / ((a * -3.0) * fma(b, b, fma(b, t_1, t_0)));
	} else {
		tmp = fma((-0.5 / b), c, (a * fma(c, ((c * -0.375) / t_2), (a * fma(((c * (c * -0.5625)) / (b * t_3)), c, (((c * (c * c)) * (c * (a * -1.0546875))) / (t_2 * t_3)))))));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(c, Float64(a * -3.0), Float64(b * b))
	t_1 = sqrt(t_0)
	t_2 = Float64(b * Float64(b * b))
	t_3 = Float64(b * t_2)
	tmp = 0.0
	if (b <= 0.005)
		tmp = Float64(Float64(t_2 - fma(Float64(c * Float64(a * -3.0)), t_1, Float64(Float64(b * b) * t_1))) / Float64(Float64(a * -3.0) * fma(b, b, fma(b, t_1, t_0))));
	else
		tmp = fma(Float64(-0.5 / b), c, Float64(a * fma(c, Float64(Float64(c * -0.375) / t_2), Float64(a * fma(Float64(Float64(c * Float64(c * -0.5625)) / Float64(b * t_3)), c, Float64(Float64(Float64(c * Float64(c * c)) * Float64(c * Float64(a * -1.0546875))) / Float64(t_2 * t_3)))))));
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(c * N[(a * -3.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * t$95$2), $MachinePrecision]}, If[LessEqual[b, 0.005], N[(N[(t$95$2 - N[(N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision] * t$95$1 + N[(N[(b * b), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a * -3.0), $MachinePrecision] * N[(b * b + N[(b * t$95$1 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 / b), $MachinePrecision] * c + N[(a * N[(c * N[(N[(c * -0.375), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(a * N[(N[(N[(c * N[(c * -0.5625), $MachinePrecision]), $MachinePrecision] / N[(b * t$95$3), $MachinePrecision]), $MachinePrecision] * c + N[(N[(N[(c * N[(c * c), $MachinePrecision]), $MachinePrecision] * N[(c * N[(a * -1.0546875), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\\
t_1 := \sqrt{t\_0}\\
t_2 := b \cdot \left(b \cdot b\right)\\
t_3 := b \cdot t\_2\\
\mathbf{if}\;b \leq 0.005:\\
\;\;\;\;\frac{t\_2 - \mathsf{fma}\left(c \cdot \left(a \cdot -3\right), t\_1, \left(b \cdot b\right) \cdot t\_1\right)}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, t\_1, t\_0\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-0.5}{b}, c, a \cdot \mathsf{fma}\left(c, \frac{c \cdot -0.375}{t\_2}, a \cdot \mathsf{fma}\left(\frac{c \cdot \left(c \cdot -0.5625\right)}{b \cdot t\_3}, c, \frac{\left(c \cdot \left(c \cdot c\right)\right) \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{t\_2 \cdot t\_3}\right)\right)\right)\\


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

    1. Initial program 93.3%

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

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

      \[\leadsto \color{blue}{\frac{b \cdot \left(b \cdot b\right) - \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \color{blue}{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
      2. *-commutativeN/A

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

        \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \color{blue}{\left(c \cdot \left(a \cdot -3\right) + b \cdot b\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
      4. distribute-rgt-inN/A

        \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \color{blue}{\left(\left(c \cdot \left(a \cdot -3\right)\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} + \left(b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \color{blue}{\mathsf{fma}\left(c \cdot \left(a \cdot -3\right), \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \left(b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
      6. lower-*.f64N/A

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

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

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

    if 0.0050000000000000001 < b

    1. Initial program 47.3%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b} + a \cdot \left(\frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{3}} + a \cdot \left(\frac{-9}{16} \cdot \frac{{c}^{3}}{{b}^{5}} + \frac{-1}{6} \cdot \frac{a \cdot \left(\frac{81}{64} \cdot \frac{{c}^{4}}{{b}^{6}} + \frac{81}{16} \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{b}\right)\right)} \]
    4. Applied rewrites95.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, \mathsf{fma}\left(a, \mathsf{fma}\left(\frac{\frac{{c}^{4}}{{b}^{6}} \cdot \left(6.328125 \cdot a\right)}{b}, -0.16666666666666666, \frac{\left(c \cdot \left(c \cdot c\right)\right) \cdot -0.5625}{{b}^{5}}\right), \frac{\left(c \cdot c\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), -0.5 \cdot \frac{c}{b}\right)} \]
    5. Applied rewrites95.1%

      \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(\mathsf{fma}\left(c, \left(c \cdot c\right) \cdot \frac{-0.5625}{\left(b \cdot b\right) \cdot \left(b \cdot \left(b \cdot b\right)\right)}, \frac{\left(c \cdot \left(c \cdot \left(c \cdot c\right)\right)\right) \cdot \left(6.328125 \cdot a\right)}{\left(\left(b \cdot b\right) \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)\right) \cdot b} \cdot -0.16666666666666666\right), \color{blue}{a}, \frac{\left(c \cdot c\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), -0.5 \cdot \frac{c}{b}\right) \]
    6. Applied rewrites95.0%

      \[\leadsto \mathsf{fma}\left(\frac{-0.5}{b}, \color{blue}{c}, a \cdot \mathsf{fma}\left(c, \frac{c \cdot -0.375}{b \cdot \left(b \cdot b\right)}, a \cdot \mathsf{fma}\left(c, \frac{\left(c \cdot c\right) \cdot -0.5625}{b \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}, \frac{\left(c \cdot \left(c \cdot \left(c \cdot c\right)\right)\right) \cdot \left(\left(6.328125 \cdot a\right) \cdot -0.16666666666666666\right)}{\left(b \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}\right)\right)\right) \]
    7. Step-by-step derivation
      1. Applied rewrites95.0%

        \[\leadsto \mathsf{fma}\left(\frac{-0.5}{b}, c, a \cdot \mathsf{fma}\left(c, \frac{c \cdot -0.375}{b \cdot \left(b \cdot b\right)}, a \cdot \mathsf{fma}\left(\frac{c \cdot \left(c \cdot -0.5625\right)}{b \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}, c, \frac{\left(c \cdot \left(c \cdot c\right)\right) \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{\left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right) \cdot \left(b \cdot \left(b \cdot b\right)\right)}\right)\right)\right) \]
    8. Recombined 2 regimes into one program.
    9. Final simplification95.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{b \cdot \left(b \cdot b\right) - \mathsf{fma}\left(c \cdot \left(a \cdot -3\right), \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \left(b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-0.5}{b}, c, a \cdot \mathsf{fma}\left(c, \frac{c \cdot -0.375}{b \cdot \left(b \cdot b\right)}, a \cdot \mathsf{fma}\left(\frac{c \cdot \left(c \cdot -0.5625\right)}{b \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}, c, \frac{\left(c \cdot \left(c \cdot c\right)\right) \cdot \left(c \cdot \left(a \cdot -1.0546875\right)\right)}{\left(b \cdot \left(b \cdot b\right)\right) \cdot \left(b \cdot \left(b \cdot \left(b \cdot b\right)\right)\right)}\right)\right)\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 4: 89.5% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\\ t_1 := \sqrt{t\_0}\\ t_2 := b \cdot \left(b \cdot b\right)\\ \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{t\_2 - \mathsf{fma}\left(c \cdot \left(a \cdot -3\right), t\_1, \left(b \cdot b\right) \cdot t\_1\right)}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, t\_1, t\_0\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{\mathsf{fma}\left(c, \frac{a \cdot -0.5}{b} - c \cdot \left(\frac{a \cdot a}{t\_2} \cdot 0.375\right), b \cdot 0.6666666666666666\right)}{c}}\\ \end{array} \end{array} \]
    (FPCore (a b c)
     :precision binary64
     (let* ((t_0 (fma c (* a -3.0) (* b b))) (t_1 (sqrt t_0)) (t_2 (* b (* b b))))
       (if (<= b 0.005)
         (/
          (- t_2 (fma (* c (* a -3.0)) t_1 (* (* b b) t_1)))
          (* (* a -3.0) (fma b b (fma b t_1 t_0))))
         (/
          -0.3333333333333333
          (/
           (fma
            c
            (- (/ (* a -0.5) b) (* c (* (/ (* a a) t_2) 0.375)))
            (* b 0.6666666666666666))
           c)))))
    double code(double a, double b, double c) {
    	double t_0 = fma(c, (a * -3.0), (b * b));
    	double t_1 = sqrt(t_0);
    	double t_2 = b * (b * b);
    	double tmp;
    	if (b <= 0.005) {
    		tmp = (t_2 - fma((c * (a * -3.0)), t_1, ((b * b) * t_1))) / ((a * -3.0) * fma(b, b, fma(b, t_1, t_0)));
    	} else {
    		tmp = -0.3333333333333333 / (fma(c, (((a * -0.5) / b) - (c * (((a * a) / t_2) * 0.375))), (b * 0.6666666666666666)) / c);
    	}
    	return tmp;
    }
    
    function code(a, b, c)
    	t_0 = fma(c, Float64(a * -3.0), Float64(b * b))
    	t_1 = sqrt(t_0)
    	t_2 = Float64(b * Float64(b * b))
    	tmp = 0.0
    	if (b <= 0.005)
    		tmp = Float64(Float64(t_2 - fma(Float64(c * Float64(a * -3.0)), t_1, Float64(Float64(b * b) * t_1))) / Float64(Float64(a * -3.0) * fma(b, b, fma(b, t_1, t_0))));
    	else
    		tmp = Float64(-0.3333333333333333 / Float64(fma(c, Float64(Float64(Float64(a * -0.5) / b) - Float64(c * Float64(Float64(Float64(a * a) / t_2) * 0.375))), Float64(b * 0.6666666666666666)) / c));
    	end
    	return tmp
    end
    
    code[a_, b_, c_] := Block[{t$95$0 = N[(c * N[(a * -3.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 0.005], N[(N[(t$95$2 - N[(N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision] * t$95$1 + N[(N[(b * b), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a * -3.0), $MachinePrecision] * N[(b * b + N[(b * t$95$1 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 / N[(N[(c * N[(N[(N[(a * -0.5), $MachinePrecision] / b), $MachinePrecision] - N[(c * N[(N[(N[(a * a), $MachinePrecision] / t$95$2), $MachinePrecision] * 0.375), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * 0.6666666666666666), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\\
    t_1 := \sqrt{t\_0}\\
    t_2 := b \cdot \left(b \cdot b\right)\\
    \mathbf{if}\;b \leq 0.005:\\
    \;\;\;\;\frac{t\_2 - \mathsf{fma}\left(c \cdot \left(a \cdot -3\right), t\_1, \left(b \cdot b\right) \cdot t\_1\right)}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, t\_1, t\_0\right)\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{-0.3333333333333333}{\frac{\mathsf{fma}\left(c, \frac{a \cdot -0.5}{b} - c \cdot \left(\frac{a \cdot a}{t\_2} \cdot 0.375\right), b \cdot 0.6666666666666666\right)}{c}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 0.0050000000000000001

      1. Initial program 93.3%

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

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

        \[\leadsto \color{blue}{\frac{b \cdot \left(b \cdot b\right) - \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)}} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \color{blue}{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
        2. *-commutativeN/A

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

          \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \color{blue}{\left(c \cdot \left(a \cdot -3\right) + b \cdot b\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
        4. distribute-rgt-inN/A

          \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \color{blue}{\left(\left(c \cdot \left(a \cdot -3\right)\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} + \left(b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
        5. lower-fma.f64N/A

          \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \color{blue}{\mathsf{fma}\left(c \cdot \left(a \cdot -3\right), \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \left(b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
        6. lower-*.f64N/A

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

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

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

      if 0.0050000000000000001 < b

      1. Initial program 47.3%

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

        \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        2. div-invN/A

          \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
        3. lift-/.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        6. metadata-evalN/A

          \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        10. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        11. lower-/.f6447.3

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        12. lift-fma.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
        15. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
        16. associate-*l*N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
        17. metadata-evalN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
        18. distribute-lft-neg-inN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
        19. lower-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{\frac{2}{3} \cdot b + c \cdot \left(-1 \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{{a}^{2}}{{b}^{3}} + \frac{3}{4} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right) - \frac{1}{2} \cdot \frac{a}{b}\right)}{c}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

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

        \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{\mathsf{fma}\left(c, \left(-c \cdot \left(\frac{a \cdot a}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right)\right) + \frac{-0.5 \cdot a}{b}, 0.6666666666666666 \cdot b\right)}{c}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification93.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{b \cdot \left(b \cdot b\right) - \mathsf{fma}\left(c \cdot \left(a \cdot -3\right), \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \left(b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{\mathsf{fma}\left(c, \frac{a \cdot -0.5}{b} - c \cdot \left(\frac{a \cdot a}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right), b \cdot 0.6666666666666666\right)}{c}}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 89.5% accurate, 0.4× speedup?

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

      1. Initial program 93.3%

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

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

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

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

          \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right) \cdot \sqrt{\color{blue}{b \cdot b + c \cdot \left(a \cdot -3\right)}}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right) \cdot \sqrt{\color{blue}{b \cdot b} + c \cdot \left(a \cdot -3\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
        4. lower-fma.f64N/A

          \[\leadsto \frac{b \cdot \left(b \cdot b\right) - \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right) \cdot \sqrt{\color{blue}{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)} \]
        5. lower-*.f6495.0

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

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

      if 0.0050000000000000001 < b

      1. Initial program 47.3%

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

        \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        2. div-invN/A

          \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
        3. lift-/.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        6. metadata-evalN/A

          \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        10. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        11. lower-/.f6447.3

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        12. lift-fma.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
        15. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
        16. associate-*l*N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
        17. metadata-evalN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
        18. distribute-lft-neg-inN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
        19. lower-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{\frac{2}{3} \cdot b + c \cdot \left(-1 \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{{a}^{2}}{{b}^{3}} + \frac{3}{4} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right) - \frac{1}{2} \cdot \frac{a}{b}\right)}{c}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

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

        \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{\mathsf{fma}\left(c, \left(-c \cdot \left(\frac{a \cdot a}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right)\right) + \frac{-0.5 \cdot a}{b}, 0.6666666666666666 \cdot b\right)}{c}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification93.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{b \cdot \left(b \cdot b\right) - \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right) \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}{\left(a \cdot -3\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}, \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{\mathsf{fma}\left(c, \frac{a \cdot -0.5}{b} - c \cdot \left(\frac{a \cdot a}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right), b \cdot 0.6666666666666666\right)}{c}}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 89.5% accurate, 0.4× speedup?

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

      1. Initial program 93.3%

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

        \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}}{-3} \]
        3. associate-/l/N/A

          \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{-3 \cdot a}} \]
        4. div-invN/A

          \[\leadsto \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{-3 \cdot a}} \]
        5. metadata-evalN/A

          \[\leadsto \left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a} \]
        6. distribute-lft-neg-inN/A

          \[\leadsto \left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(3 \cdot a\right)}} \]
        7. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \cdot \frac{1}{a \cdot -3}} \]
      6. Step-by-step derivation
        1. lift--.f64N/A

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

          \[\leadsto \color{blue}{\frac{b \cdot b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}} \cdot \frac{1}{a \cdot -3} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{b \cdot b} - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}} \cdot \frac{1}{a \cdot -3} \]
        4. lift-sqrt.f64N/A

          \[\leadsto \frac{b \cdot b - \color{blue}{\sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}} \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}} \cdot \frac{1}{a \cdot -3} \]
        5. lift-sqrt.f64N/A

          \[\leadsto \frac{b \cdot b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \color{blue}{\sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}{b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}} \cdot \frac{1}{a \cdot -3} \]
        6. rem-square-sqrtN/A

          \[\leadsto \frac{b \cdot b - \color{blue}{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}} \cdot \frac{1}{a \cdot -3} \]
        7. div-subN/A

          \[\leadsto \color{blue}{\left(\frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}} - \frac{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}\right)} \cdot \frac{1}{a \cdot -3} \]
        8. lower--.f64N/A

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

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

      if 0.0050000000000000001 < b

      1. Initial program 47.3%

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

        \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        2. div-invN/A

          \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
        3. lift-/.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        6. metadata-evalN/A

          \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        10. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        11. lower-/.f6447.3

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        12. lift-fma.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
        15. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
        16. associate-*l*N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
        17. metadata-evalN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
        18. distribute-lft-neg-inN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
        19. lower-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{\frac{2}{3} \cdot b + c \cdot \left(-1 \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{{a}^{2}}{{b}^{3}} + \frac{3}{4} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right) - \frac{1}{2} \cdot \frac{a}{b}\right)}{c}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

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

        \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{\mathsf{fma}\left(c, \left(-c \cdot \left(\frac{a \cdot a}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right)\right) + \frac{-0.5 \cdot a}{b}, 0.6666666666666666 \cdot b\right)}{c}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification93.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\left(\frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}} - \frac{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}{b + \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}\right) \cdot \frac{1}{a \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{\mathsf{fma}\left(c, \frac{a \cdot -0.5}{b} - c \cdot \left(\frac{a \cdot a}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right), b \cdot 0.6666666666666666\right)}{c}}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 7: 89.5% accurate, 0.4× speedup?

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

      1. Initial program 93.3%

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

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

      if 0.0050000000000000001 < b

      1. Initial program 47.3%

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

        \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        2. div-invN/A

          \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
        3. lift-/.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        6. metadata-evalN/A

          \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        10. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        11. lower-/.f6447.3

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        12. lift-fma.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
        15. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
        16. associate-*l*N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
        17. metadata-evalN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
        18. distribute-lft-neg-inN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
        19. lower-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{\frac{2}{3} \cdot b + c \cdot \left(-1 \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{{a}^{2}}{{b}^{3}} + \frac{3}{4} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right) - \frac{1}{2} \cdot \frac{a}{b}\right)}{c}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

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

        \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{\mathsf{fma}\left(c, \left(-c \cdot \left(\frac{a \cdot a}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right)\right) + \frac{-0.5 \cdot a}{b}, 0.6666666666666666 \cdot b\right)}{c}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification93.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}} - \frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{\mathsf{fma}\left(c, \frac{a \cdot -0.5}{b} - c \cdot \left(\frac{a \cdot a}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right), b \cdot 0.6666666666666666\right)}{c}}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 89.5% accurate, 0.5× speedup?

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

      1. Initial program 93.3%

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

        \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        2. div-invN/A

          \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
        3. lift-/.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        6. metadata-evalN/A

          \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        10. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        11. lower-/.f6493.6

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        12. lift-fma.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
        15. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
        16. associate-*l*N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
        17. metadata-evalN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
        18. distribute-lft-neg-inN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
        19. lower-fma.f64N/A

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{a}{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}} \]
      6. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}} \]
        2. lift--.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{\color{blue}{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}} \]
        3. flip--N/A

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

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{a}{b \cdot b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}} \cdot \left(b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}} \]
        5. lower-*.f64N/A

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

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

      if 0.0050000000000000001 < b

      1. Initial program 47.3%

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

        \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        2. div-invN/A

          \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
        3. lift-/.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        6. metadata-evalN/A

          \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        10. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        11. lower-/.f6447.3

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        12. lift-fma.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
        15. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
        16. associate-*l*N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
        17. metadata-evalN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
        18. distribute-lft-neg-inN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
        19. lower-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{\frac{2}{3} \cdot b + c \cdot \left(-1 \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{{a}^{2}}{{b}^{3}} + \frac{3}{4} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right) - \frac{1}{2} \cdot \frac{a}{b}\right)}{c}}} \]
      7. Step-by-step derivation
        1. lower-/.f64N/A

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

        \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{\mathsf{fma}\left(c, \left(-c \cdot \left(\frac{a \cdot a}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right)\right) + \frac{-0.5 \cdot a}{b}, 0.6666666666666666 \cdot b\right)}{c}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification93.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{a}{b \cdot b - \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \left(b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{\mathsf{fma}\left(c, \frac{a \cdot -0.5}{b} - c \cdot \left(\frac{a \cdot a}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right), b \cdot 0.6666666666666666\right)}{c}}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 89.5% accurate, 0.6× speedup?

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

      1. Initial program 93.3%

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

        \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        2. div-invN/A

          \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
        3. lift-/.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        6. metadata-evalN/A

          \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        10. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        11. lower-/.f6493.6

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        12. lift-fma.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
        15. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
        16. associate-*l*N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
        17. metadata-evalN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
        18. distribute-lft-neg-inN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
        19. lower-fma.f64N/A

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{a}{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}} \]
      6. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}} \]
        2. lift--.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{\color{blue}{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}} \]
        3. flip--N/A

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

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{a}{b \cdot b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}} \cdot \left(b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}} \]
        5. lower-*.f64N/A

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

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

      if 0.0050000000000000001 < b

      1. Initial program 47.3%

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

        \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        2. div-invN/A

          \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
        3. lift-/.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        6. metadata-evalN/A

          \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        10. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        11. lower-/.f6447.3

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        12. lift-fma.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
        15. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
        16. associate-*l*N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
        17. metadata-evalN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
        18. distribute-lft-neg-inN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
        19. lower-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{2}{3} \cdot \frac{b}{c} + a \cdot \left(-1 \cdot \left(a \cdot \left(\frac{-3}{8} \cdot \frac{c}{{b}^{3}} + \frac{3}{4} \cdot \frac{c}{{b}^{3}}\right)\right) - \frac{1}{2} \cdot \frac{1}{b}\right)}} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{a \cdot \left(-1 \cdot \left(a \cdot \left(\frac{-3}{8} \cdot \frac{c}{{b}^{3}} + \frac{3}{4} \cdot \frac{c}{{b}^{3}}\right)\right) - \frac{1}{2} \cdot \frac{1}{b}\right) + \frac{2}{3} \cdot \frac{b}{c}}} \]
        2. lower-fma.f64N/A

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

        \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\mathsf{fma}\left(a, \left(-a \cdot \left(\frac{c}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right)\right) - \frac{0.5}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification93.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{a}{b \cdot b - \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \left(b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(a, a \cdot \left(0.375 \cdot \frac{c}{b \cdot \left(b \cdot \left(-b\right)\right)}\right) - \frac{0.5}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 89.5% accurate, 0.6× speedup?

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

      1. Initial program 93.3%

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

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

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

      if 0.0050000000000000001 < b

      1. Initial program 47.3%

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

        \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        2. div-invN/A

          \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
        3. lift-/.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        6. metadata-evalN/A

          \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        10. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        11. lower-/.f6447.3

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        12. lift-fma.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
        15. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
        16. associate-*l*N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
        17. metadata-evalN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
        18. distribute-lft-neg-inN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
        19. lower-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{2}{3} \cdot \frac{b}{c} + a \cdot \left(-1 \cdot \left(a \cdot \left(\frac{-3}{8} \cdot \frac{c}{{b}^{3}} + \frac{3}{4} \cdot \frac{c}{{b}^{3}}\right)\right) - \frac{1}{2} \cdot \frac{1}{b}\right)}} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{a \cdot \left(-1 \cdot \left(a \cdot \left(\frac{-3}{8} \cdot \frac{c}{{b}^{3}} + \frac{3}{4} \cdot \frac{c}{{b}^{3}}\right)\right) - \frac{1}{2} \cdot \frac{1}{b}\right) + \frac{2}{3} \cdot \frac{b}{c}}} \]
        2. lower-fma.f64N/A

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

        \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\mathsf{fma}\left(a, \left(-a \cdot \left(\frac{c}{b \cdot \left(b \cdot b\right)} \cdot 0.375\right)\right) - \frac{0.5}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification93.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.005:\\ \;\;\;\;\frac{b \cdot b - \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}{\left(a \cdot -3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(a, a \cdot \left(0.375 \cdot \frac{c}{b \cdot \left(b \cdot \left(-b\right)\right)}\right) - \frac{0.5}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 89.6% accurate, 0.6× speedup?

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

      1. Initial program 82.0%

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

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

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

      if 1.19999999999999996 < b

      1. Initial program 44.6%

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

        \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
        2. sub-negN/A

          \[\leadsto c \cdot \color{blue}{\left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right)} \]
        3. associate-*r/N/A

          \[\leadsto c \cdot \left(c \cdot \left(\color{blue}{\frac{\frac{-9}{16} \cdot \left({a}^{2} \cdot c\right)}{{b}^{5}}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
        4. associate-*r*N/A

          \[\leadsto c \cdot \left(c \cdot \left(\frac{\color{blue}{\left(\frac{-9}{16} \cdot {a}^{2}\right) \cdot c}}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
        5. associate-*l/N/A

          \[\leadsto c \cdot \left(c \cdot \left(\color{blue}{\frac{\frac{-9}{16} \cdot {a}^{2}}{{b}^{5}} \cdot c} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
        6. associate-*r/N/A

          \[\leadsto c \cdot \left(c \cdot \left(\color{blue}{\left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right)} \cdot c + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
        7. +-commutativeN/A

          \[\leadsto c \cdot \left(c \cdot \color{blue}{\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right) \cdot c\right)} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
        8. lower-fma.f64N/A

          \[\leadsto c \cdot \color{blue}{\mathsf{fma}\left(c, \frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right) \cdot c, \mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)} \]
      5. Applied rewrites94.5%

        \[\leadsto \color{blue}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(a \cdot a, \frac{c}{{b}^{5}} \cdot -0.5625, \frac{a \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), \frac{-0.5}{b}\right)} \]
      6. Taylor expanded in b around inf

        \[\leadsto c \cdot \mathsf{fma}\left(c, \frac{\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{2}} + \frac{-3}{8} \cdot a}{\color{blue}{{b}^{3}}}, \frac{\frac{-1}{2}}{b}\right) \]
      7. Step-by-step derivation
        1. Applied rewrites94.5%

          \[\leadsto c \cdot \mathsf{fma}\left(c, \frac{\mathsf{fma}\left(-0.5625, \frac{c \cdot \left(a \cdot a\right)}{b \cdot b}, a \cdot -0.375\right)}{\color{blue}{b \cdot \left(b \cdot b\right)}}, \frac{-0.5}{b}\right) \]
      8. Recombined 2 regimes into one program.
      9. Add Preprocessing

      Alternative 12: 85.5% accurate, 0.6× speedup?

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

        1. Initial program 82.0%

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

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

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

        if 1.25 < b

        1. Initial program 44.6%

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

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
          2. div-invN/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
          3. lift-/.f64N/A

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

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

            \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          6. metadata-evalN/A

            \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          8. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          10. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          11. lower-/.f6444.6

            \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          12. lift-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
          13. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
          14. lift-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
          15. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
          16. associate-*l*N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
          17. metadata-evalN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
          18. distribute-lft-neg-inN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
          19. lower-fma.f64N/A

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

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

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{b \cdot \left(\frac{-1}{2} \cdot \frac{a}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{c}\right)}} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{b \cdot \left(\frac{-1}{2} \cdot \frac{a}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{c}\right)}} \]
          2. lower-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{a}{{b}^{2}}, \frac{2}{3} \cdot \frac{1}{c}\right)}} \]
          3. lower-/.f64N/A

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

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{\color{blue}{b \cdot b}}, \frac{2}{3} \cdot \frac{1}{c}\right)} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{\color{blue}{b \cdot b}}, \frac{2}{3} \cdot \frac{1}{c}\right)} \]
          6. associate-*r/N/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b \cdot b}, \color{blue}{\frac{\frac{2}{3} \cdot 1}{c}}\right)} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b \cdot b}, \frac{\color{blue}{\frac{2}{3}}}{c}\right)} \]
          8. lower-/.f6490.9

            \[\leadsto \frac{-0.3333333333333333}{b \cdot \mathsf{fma}\left(-0.5, \frac{a}{b \cdot b}, \color{blue}{\frac{0.6666666666666666}{c}}\right)} \]
        8. Applied rewrites90.9%

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{b \cdot \mathsf{fma}\left(-0.5, \frac{a}{b \cdot b}, \frac{0.6666666666666666}{c}\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 13: 85.5% accurate, 0.6× speedup?

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

        1. Initial program 82.0%

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

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
          2. div-invN/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
          3. lift-/.f64N/A

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

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

            \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          6. metadata-evalN/A

            \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          8. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          10. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          11. lower-/.f6482.1

            \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          12. lift-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
          13. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
          14. lift-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
          15. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
          16. associate-*l*N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
          17. metadata-evalN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
          18. distribute-lft-neg-inN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
          19. lower-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\mathsf{fma}\left(c, \mathsf{neg}\left(3 \cdot a\right), b \cdot b\right)}}}} \]
        5. Applied rewrites82.0%

          \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{a}{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}} \]
        6. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}} \]
          3. associate-/r/N/A

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

            \[\leadsto \frac{\frac{-1}{3}}{a} \cdot \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)} \]
          5. flip--N/A

            \[\leadsto \frac{\frac{-1}{3}}{a} \cdot \color{blue}{\frac{b \cdot b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}} \]
          6. frac-timesN/A

            \[\leadsto \color{blue}{\frac{\frac{-1}{3} \cdot \left(b \cdot b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)} \cdot \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}{a \cdot \left(b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right)}} \]
          7. lower-/.f64N/A

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

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

        if 1.25 < b

        1. Initial program 44.6%

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

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
          2. div-invN/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
          3. lift-/.f64N/A

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

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

            \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          6. metadata-evalN/A

            \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          8. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          10. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          11. lower-/.f6444.6

            \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          12. lift-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
          13. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
          14. lift-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
          15. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
          16. associate-*l*N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
          17. metadata-evalN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
          18. distribute-lft-neg-inN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
          19. lower-fma.f64N/A

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

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

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{b \cdot \left(\frac{-1}{2} \cdot \frac{a}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{c}\right)}} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{b \cdot \left(\frac{-1}{2} \cdot \frac{a}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{c}\right)}} \]
          2. lower-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{a}{{b}^{2}}, \frac{2}{3} \cdot \frac{1}{c}\right)}} \]
          3. lower-/.f64N/A

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

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{\color{blue}{b \cdot b}}, \frac{2}{3} \cdot \frac{1}{c}\right)} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{\color{blue}{b \cdot b}}, \frac{2}{3} \cdot \frac{1}{c}\right)} \]
          6. associate-*r/N/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b \cdot b}, \color{blue}{\frac{\frac{2}{3} \cdot 1}{c}}\right)} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b \cdot b}, \frac{\color{blue}{\frac{2}{3}}}{c}\right)} \]
          8. lower-/.f6490.9

            \[\leadsto \frac{-0.3333333333333333}{b \cdot \mathsf{fma}\left(-0.5, \frac{a}{b \cdot b}, \color{blue}{\frac{0.6666666666666666}{c}}\right)} \]
        8. Applied rewrites90.9%

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{b \cdot \mathsf{fma}\left(-0.5, \frac{a}{b \cdot b}, \frac{0.6666666666666666}{c}\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 14: 85.3% accurate, 0.9× speedup?

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

        1. Initial program 82.0%

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

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}}{-3} \]
          3. associate-/l/N/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{-3 \cdot a}} \]
          4. div-invN/A

            \[\leadsto \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{-3 \cdot a}} \]
          5. metadata-evalN/A

            \[\leadsto \left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a} \]
          6. distribute-lft-neg-inN/A

            \[\leadsto \left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(3 \cdot a\right)}} \]
          7. lower-*.f64N/A

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

          \[\leadsto \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \cdot \frac{1}{a \cdot -3}} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \cdot \frac{1}{a \cdot -3}} \]
          2. lift-/.f64N/A

            \[\leadsto \left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \cdot \color{blue}{\frac{1}{a \cdot -3}} \]
          3. un-div-invN/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{a \cdot -3}} \]
          4. lower-/.f6482.0

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{a \cdot -3}} \]
          5. lift-fma.f64N/A

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

            \[\leadsto \frac{b - \sqrt{\color{blue}{b \cdot b + c \cdot \left(a \cdot -3\right)}}}{a \cdot -3} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{b - \sqrt{\color{blue}{b \cdot b} + c \cdot \left(a \cdot -3\right)}}{a \cdot -3} \]
          8. lower-fma.f64N/A

            \[\leadsto \frac{b - \sqrt{\color{blue}{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}}{a \cdot -3} \]
          9. *-commutativeN/A

            \[\leadsto \frac{b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right) \cdot c}\right)}}{a \cdot -3} \]
          10. lift-*.f64N/A

            \[\leadsto \frac{b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)}}{a \cdot -3} \]
          11. associate-*l*N/A

            \[\leadsto \frac{b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(-3 \cdot c\right)}\right)}}{a \cdot -3} \]
          12. lower-*.f64N/A

            \[\leadsto \frac{b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(-3 \cdot c\right)}\right)}}{a \cdot -3} \]
          13. lower-*.f6482.4

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

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

        if 1.25 < b

        1. Initial program 44.6%

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

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
          2. div-invN/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
          3. lift-/.f64N/A

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

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

            \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          6. metadata-evalN/A

            \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          8. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          10. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          11. lower-/.f6444.6

            \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          12. lift-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
          13. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
          14. lift-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
          15. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
          16. associate-*l*N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
          17. metadata-evalN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
          18. distribute-lft-neg-inN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
          19. lower-fma.f64N/A

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

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

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{b \cdot \left(\frac{-1}{2} \cdot \frac{a}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{c}\right)}} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{b \cdot \left(\frac{-1}{2} \cdot \frac{a}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{c}\right)}} \]
          2. lower-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{a}{{b}^{2}}, \frac{2}{3} \cdot \frac{1}{c}\right)}} \]
          3. lower-/.f64N/A

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

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{\color{blue}{b \cdot b}}, \frac{2}{3} \cdot \frac{1}{c}\right)} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{\color{blue}{b \cdot b}}, \frac{2}{3} \cdot \frac{1}{c}\right)} \]
          6. associate-*r/N/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b \cdot b}, \color{blue}{\frac{\frac{2}{3} \cdot 1}{c}}\right)} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\frac{-1}{3}}{b \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b \cdot b}, \frac{\color{blue}{\frac{2}{3}}}{c}\right)} \]
          8. lower-/.f6490.9

            \[\leadsto \frac{-0.3333333333333333}{b \cdot \mathsf{fma}\left(-0.5, \frac{a}{b \cdot b}, \color{blue}{\frac{0.6666666666666666}{c}}\right)} \]
        8. Applied rewrites90.9%

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{b \cdot \mathsf{fma}\left(-0.5, \frac{a}{b \cdot b}, \frac{0.6666666666666666}{c}\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification89.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.25:\\ \;\;\;\;\frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{b \cdot \mathsf{fma}\left(-0.5, \frac{a}{b \cdot b}, \frac{0.6666666666666666}{c}\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 15: 85.3% accurate, 1.0× speedup?

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

        1. Initial program 82.0%

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

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}}{-3} \]
          3. associate-/l/N/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{-3 \cdot a}} \]
          4. div-invN/A

            \[\leadsto \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{-3 \cdot a}} \]
          5. metadata-evalN/A

            \[\leadsto \left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a} \]
          6. distribute-lft-neg-inN/A

            \[\leadsto \left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(3 \cdot a\right)}} \]
          7. lower-*.f64N/A

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

          \[\leadsto \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \cdot \frac{1}{a \cdot -3}} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \cdot \frac{1}{a \cdot -3}} \]
          2. lift-/.f64N/A

            \[\leadsto \left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \cdot \color{blue}{\frac{1}{a \cdot -3}} \]
          3. un-div-invN/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{a \cdot -3}} \]
          4. lower-/.f6482.0

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{a \cdot -3}} \]
          5. lift-fma.f64N/A

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

            \[\leadsto \frac{b - \sqrt{\color{blue}{b \cdot b + c \cdot \left(a \cdot -3\right)}}}{a \cdot -3} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{b - \sqrt{\color{blue}{b \cdot b} + c \cdot \left(a \cdot -3\right)}}{a \cdot -3} \]
          8. lower-fma.f64N/A

            \[\leadsto \frac{b - \sqrt{\color{blue}{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}}{a \cdot -3} \]
          9. *-commutativeN/A

            \[\leadsto \frac{b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right) \cdot c}\right)}}{a \cdot -3} \]
          10. lift-*.f64N/A

            \[\leadsto \frac{b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)}}{a \cdot -3} \]
          11. associate-*l*N/A

            \[\leadsto \frac{b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(-3 \cdot c\right)}\right)}}{a \cdot -3} \]
          12. lower-*.f64N/A

            \[\leadsto \frac{b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(-3 \cdot c\right)}\right)}}{a \cdot -3} \]
          13. lower-*.f6482.4

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

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

        if 1.25 < b

        1. Initial program 44.6%

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

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
          2. div-invN/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
          3. lift-/.f64N/A

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

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

            \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          6. metadata-evalN/A

            \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          8. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          10. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          11. lower-/.f6444.6

            \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          12. lift-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
          13. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
          14. lift-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
          15. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
          16. associate-*l*N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
          17. metadata-evalN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
          18. distribute-lft-neg-inN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
          19. lower-fma.f64N/A

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

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

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{-1}{2} \cdot \frac{a}{b} + \frac{2}{3} \cdot \frac{b}{c}}} \]
        7. Step-by-step derivation
          1. lower-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b}, \frac{2}{3} \cdot \frac{b}{c}\right)}} \]
          2. lower-/.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{a}{b}}, \frac{2}{3} \cdot \frac{b}{c}\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b}, \color{blue}{\frac{2}{3} \cdot \frac{b}{c}}\right)} \]
          4. lower-/.f6490.8

            \[\leadsto \frac{-0.3333333333333333}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \color{blue}{\frac{b}{c}}\right)} \]
        8. Applied rewrites90.8%

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification89.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.25:\\ \;\;\;\;\frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 16: 85.3% accurate, 1.0× speedup?

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

        1. Initial program 82.0%

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

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}}{-3} \]
          3. associate-/l/N/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{-3 \cdot a}} \]
          4. div-invN/A

            \[\leadsto \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{-3 \cdot a}} \]
          5. metadata-evalN/A

            \[\leadsto \left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a} \]
          6. distribute-lft-neg-inN/A

            \[\leadsto \left(b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right) \cdot \frac{1}{\color{blue}{\mathsf{neg}\left(3 \cdot a\right)}} \]
          7. lower-*.f64N/A

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

          \[\leadsto \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \cdot \frac{1}{a \cdot -3}} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

            \[\leadsto \color{blue}{\frac{1}{a \cdot -3}} \cdot \left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \]
          5. lift-*.f64N/A

            \[\leadsto \frac{1}{\color{blue}{a \cdot -3}} \cdot \left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \]
          6. *-commutativeN/A

            \[\leadsto \frac{1}{\color{blue}{-3 \cdot a}} \cdot \left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \]
          7. associate-/r*N/A

            \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{a}} \cdot \left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \]
          8. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{a} \cdot \left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \]
          9. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{{-3}^{-1}}}{a} \cdot \left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \]
          10. lower-/.f64N/A

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

            \[\leadsto \frac{\color{blue}{-0.3333333333333333}}{a} \cdot \left(b - \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}\right) \]
          12. lift-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{a} \cdot \left(b - \sqrt{\color{blue}{c \cdot \left(a \cdot -3\right) + b \cdot b}}\right) \]
          13. +-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{a} \cdot \left(b - \sqrt{\color{blue}{b \cdot b + c \cdot \left(a \cdot -3\right)}}\right) \]
          14. lift-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{a} \cdot \left(b - \sqrt{\color{blue}{b \cdot b} + c \cdot \left(a \cdot -3\right)}\right) \]
          15. lower-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{a} \cdot \left(b - \sqrt{\color{blue}{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}\right) \]
          16. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{a} \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right) \cdot c}\right)}\right) \]
          17. lift-*.f64N/A

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

            \[\leadsto \frac{\frac{-1}{3}}{a} \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(-3 \cdot c\right)}\right)}\right) \]
          19. lower-*.f64N/A

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

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

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

        if 1.25 < b

        1. Initial program 44.6%

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

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
          2. div-invN/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
          3. lift-/.f64N/A

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

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

            \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          6. metadata-evalN/A

            \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          8. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          10. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          11. lower-/.f6444.6

            \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          12. lift-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
          13. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
          14. lift-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
          15. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
          16. associate-*l*N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
          17. metadata-evalN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
          18. distribute-lft-neg-inN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
          19. lower-fma.f64N/A

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

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

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{-1}{2} \cdot \frac{a}{b} + \frac{2}{3} \cdot \frac{b}{c}}} \]
        7. Step-by-step derivation
          1. lower-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b}, \frac{2}{3} \cdot \frac{b}{c}\right)}} \]
          2. lower-/.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{a}{b}}, \frac{2}{3} \cdot \frac{b}{c}\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b}, \color{blue}{\frac{2}{3} \cdot \frac{b}{c}}\right)} \]
          4. lower-/.f6490.8

            \[\leadsto \frac{-0.3333333333333333}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \color{blue}{\frac{b}{c}}\right)} \]
        8. Applied rewrites90.8%

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification89.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.25:\\ \;\;\;\;\left(b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right) \cdot \frac{-0.3333333333333333}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 17: 85.3% accurate, 1.0× speedup?

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

        1. Initial program 82.0%

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

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

        if 1.25 < b

        1. Initial program 44.6%

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

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        4. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
          2. div-invN/A

            \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
          3. lift-/.f64N/A

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

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

            \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          6. metadata-evalN/A

            \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          8. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          9. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          10. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
          11. lower-/.f6444.6

            \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
          12. lift-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
          13. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
          14. lift-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
          15. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
          16. associate-*l*N/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
          17. metadata-evalN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
          18. distribute-lft-neg-inN/A

            \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
          19. lower-fma.f64N/A

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

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

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{-1}{2} \cdot \frac{a}{b} + \frac{2}{3} \cdot \frac{b}{c}}} \]
        7. Step-by-step derivation
          1. lower-fma.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b}, \frac{2}{3} \cdot \frac{b}{c}\right)}} \]
          2. lower-/.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{a}{b}}, \frac{2}{3} \cdot \frac{b}{c}\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\frac{-1}{3}}{\mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b}, \color{blue}{\frac{2}{3} \cdot \frac{b}{c}}\right)} \]
          4. lower-/.f6490.8

            \[\leadsto \frac{-0.3333333333333333}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \color{blue}{\frac{b}{c}}\right)} \]
        8. Applied rewrites90.8%

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification89.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.25:\\ \;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b - \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 18: 82.1% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \frac{-0.3333333333333333}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)} \end{array} \]
      (FPCore (a b c)
       :precision binary64
       (/ -0.3333333333333333 (fma -0.5 (/ a b) (* 0.6666666666666666 (/ b c)))))
      double code(double a, double b, double c) {
      	return -0.3333333333333333 / fma(-0.5, (a / b), (0.6666666666666666 * (b / c)));
      }
      
      function code(a, b, c)
      	return Float64(-0.3333333333333333 / fma(-0.5, Float64(a / b), Float64(0.6666666666666666 * Float64(b / c))))
      end
      
      code[a_, b_, c_] := N[(-0.3333333333333333 / N[(-0.5 * N[(a / b), $MachinePrecision] + N[(0.6666666666666666 * N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \frac{-0.3333333333333333}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}
      \end{array}
      
      Derivation
      1. Initial program 49.4%

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

        \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
      4. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a}}{-3}} \]
        2. div-invN/A

          \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}{a} \cdot \frac{1}{-3}} \]
        3. lift-/.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        6. metadata-evalN/A

          \[\leadsto \frac{1 \cdot \color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{1}{-3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        9. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        10. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{3}}}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} \]
        11. lower-/.f6449.5

          \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{a}{b - \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}} \]
        12. lift-fma.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{a \cdot \left(-3 \cdot c\right) + b \cdot b}}}} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right) \cdot a} + b \cdot b}}} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(-3 \cdot c\right)} \cdot a + b \cdot b}}} \]
        15. *-commutativeN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{\left(c \cdot -3\right)} \cdot a + b \cdot b}}} \]
        16. associate-*l*N/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b}}} \]
        17. metadata-evalN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) + b \cdot b}}} \]
        18. distribute-lft-neg-inN/A

          \[\leadsto \frac{\frac{-1}{3}}{\frac{a}{b - \sqrt{c \cdot \color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} + b \cdot b}}} \]
        19. lower-fma.f64N/A

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

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

        \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\frac{-1}{2} \cdot \frac{a}{b} + \frac{2}{3} \cdot \frac{b}{c}}} \]
      7. Step-by-step derivation
        1. lower-fma.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b}, \frac{2}{3} \cdot \frac{b}{c}\right)}} \]
        2. lower-/.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{a}{b}}, \frac{2}{3} \cdot \frac{b}{c}\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{\frac{-1}{3}}{\mathsf{fma}\left(\frac{-1}{2}, \frac{a}{b}, \color{blue}{\frac{2}{3} \cdot \frac{b}{c}}\right)} \]
        4. lower-/.f6486.5

          \[\leadsto \frac{-0.3333333333333333}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \color{blue}{\frac{b}{c}}\right)} \]
      8. Applied rewrites86.5%

        \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\mathsf{fma}\left(-0.5, \frac{a}{b}, 0.6666666666666666 \cdot \frac{b}{c}\right)}} \]
      9. Add Preprocessing

      Alternative 19: 81.4% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ c \cdot \frac{\mathsf{fma}\left(-0.375, a \cdot \frac{c}{b \cdot b}, -0.5\right)}{b} \end{array} \]
      (FPCore (a b c)
       :precision binary64
       (* c (/ (fma -0.375 (* a (/ c (* b b))) -0.5) b)))
      double code(double a, double b, double c) {
      	return c * (fma(-0.375, (a * (c / (b * b))), -0.5) / b);
      }
      
      function code(a, b, c)
      	return Float64(c * Float64(fma(-0.375, Float64(a * Float64(c / Float64(b * b))), -0.5) / b))
      end
      
      code[a_, b_, c_] := N[(c * N[(N[(-0.375 * N[(a * N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -0.5), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      c \cdot \frac{\mathsf{fma}\left(-0.375, a \cdot \frac{c}{b \cdot b}, -0.5\right)}{b}
      \end{array}
      
      Derivation
      1. Initial program 49.4%

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

        \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
        2. sub-negN/A

          \[\leadsto c \cdot \color{blue}{\left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right)} \]
        3. associate-*r/N/A

          \[\leadsto c \cdot \left(c \cdot \left(\color{blue}{\frac{\frac{-9}{16} \cdot \left({a}^{2} \cdot c\right)}{{b}^{5}}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
        4. associate-*r*N/A

          \[\leadsto c \cdot \left(c \cdot \left(\frac{\color{blue}{\left(\frac{-9}{16} \cdot {a}^{2}\right) \cdot c}}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
        5. associate-*l/N/A

          \[\leadsto c \cdot \left(c \cdot \left(\color{blue}{\frac{\frac{-9}{16} \cdot {a}^{2}}{{b}^{5}} \cdot c} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
        6. associate-*r/N/A

          \[\leadsto c \cdot \left(c \cdot \left(\color{blue}{\left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right)} \cdot c + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
        7. +-commutativeN/A

          \[\leadsto c \cdot \left(c \cdot \color{blue}{\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right) \cdot c\right)} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
        8. lower-fma.f64N/A

          \[\leadsto c \cdot \color{blue}{\mathsf{fma}\left(c, \frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right) \cdot c, \mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)} \]
      5. Applied rewrites90.8%

        \[\leadsto \color{blue}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(a \cdot a, \frac{c}{{b}^{5}} \cdot -0.5625, \frac{a \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right), \frac{-0.5}{b}\right)} \]
      6. Taylor expanded in b around inf

        \[\leadsto c \cdot \frac{\frac{-3}{8} \cdot \frac{a \cdot c}{{b}^{2}} - \frac{1}{2}}{\color{blue}{b}} \]
      7. Step-by-step derivation
        1. Applied rewrites86.1%

          \[\leadsto c \cdot \frac{\mathsf{fma}\left(-0.375, a \cdot \frac{c}{b \cdot b}, -0.5\right)}{\color{blue}{b}} \]
        2. Add Preprocessing

        Alternative 20: 64.3% accurate, 2.9× 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 49.4%

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

          \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
        4. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
          2. lower-/.f6469.5

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

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

        Reproduce

        ?
        herbie shell --seed 2024234 
        (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)))