Cubic critical, narrow range

Percentage Accurate: 54.9% → 94.2%
Time: 59.6s
Alternatives: 19
Speedup: 23.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 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: 54.9% 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: 94.2% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{{a}^{2}}{{b}^{3}} \cdot -0.375\\ t_1 := \frac{{a}^{4}}{{b}^{6}} \cdot 6.328125\\ t_2 := \frac{t\_1}{a}\\ t_3 := \mathsf{fma}\left(-0.75, \frac{a \cdot t\_0}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot t\_2, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)\\ t_4 := \mathsf{fma}\left(-1.125, \frac{{a}^{2} \cdot t\_0}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{t\_3}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\mathsf{fma}\left(1.5, a \cdot \frac{t\_1}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{a}, \frac{t\_1}{b} \cdot 0.16666666666666666\right)\right)\right)\\ \frac{1}{\frac{\mathsf{fma}\left(-2, b, c \cdot \mathsf{fma}\left(1.5, \frac{a}{b}, c \cdot \mathsf{fma}\left(-3, t\_0, c \cdot \mathsf{fma}\left(-3, t\_3, c \cdot \left(-3 \cdot \left(t\_4 + c \cdot \mathsf{fma}\left(-1.125, {a}^{2} \cdot \frac{t\_3}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{t\_4}{{b}^{2}}, \mathsf{fma}\left(-0.3333333333333333, t\_0 \cdot t\_2, -4.4296875 \cdot \frac{{a}^{5}}{{b}^{9}}\right)\right)\right)\right)\right)\right)\right)\right)\right)}{c}} \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* (/ (pow a 2.0) (pow b 3.0)) -0.375))
        (t_1 (* (/ (pow a 4.0) (pow b 6.0)) 6.328125))
        (t_2 (/ t_1 a))
        (t_3
         (fma
          -0.75
          (/ (* a t_0) (pow b 2.0))
          (fma
           -0.2222222222222222
           (* b t_2)
           (* (/ (pow a 3.0) (pow b 5.0)) 0.5625))))
        (t_4
         (fma
          -1.125
          (/ (* (pow a 2.0) t_0) (pow b 4.0))
          (fma
           -0.75
           (* a (/ t_3 (pow b 2.0)))
           (fma
            -0.2222222222222222
            (*
             b
             (/
              (fma
               1.5
               (* a (/ t_1 (pow b 2.0)))
               (* 3.796875 (/ (pow a 5.0) (pow b 8.0))))
              a))
            (* (/ t_1 b) 0.16666666666666666))))))
   (/
    1.0
    (/
     (fma
      -2.0
      b
      (*
       c
       (fma
        1.5
        (/ a b)
        (*
         c
         (fma
          -3.0
          t_0
          (*
           c
           (fma
            -3.0
            t_3
            (*
             c
             (*
              -3.0
              (+
               t_4
               (*
                c
                (fma
                 -1.125
                 (* (pow a 2.0) (/ t_3 (pow b 4.0)))
                 (fma
                  -0.75
                  (* a (/ t_4 (pow b 2.0)))
                  (fma
                   -0.3333333333333333
                   (* t_0 t_2)
                   (* -4.4296875 (/ (pow a 5.0) (pow b 9.0)))))))))))))))))
     c))))
double code(double a, double b, double c) {
	double t_0 = (pow(a, 2.0) / pow(b, 3.0)) * -0.375;
	double t_1 = (pow(a, 4.0) / pow(b, 6.0)) * 6.328125;
	double t_2 = t_1 / a;
	double t_3 = fma(-0.75, ((a * t_0) / pow(b, 2.0)), fma(-0.2222222222222222, (b * t_2), ((pow(a, 3.0) / pow(b, 5.0)) * 0.5625)));
	double t_4 = fma(-1.125, ((pow(a, 2.0) * t_0) / pow(b, 4.0)), fma(-0.75, (a * (t_3 / pow(b, 2.0))), fma(-0.2222222222222222, (b * (fma(1.5, (a * (t_1 / pow(b, 2.0))), (3.796875 * (pow(a, 5.0) / pow(b, 8.0)))) / a)), ((t_1 / b) * 0.16666666666666666))));
	return 1.0 / (fma(-2.0, b, (c * fma(1.5, (a / b), (c * fma(-3.0, t_0, (c * fma(-3.0, t_3, (c * (-3.0 * (t_4 + (c * fma(-1.125, (pow(a, 2.0) * (t_3 / pow(b, 4.0))), fma(-0.75, (a * (t_4 / pow(b, 2.0))), fma(-0.3333333333333333, (t_0 * t_2), (-4.4296875 * (pow(a, 5.0) / pow(b, 9.0))))))))))))))))) / c);
}
function code(a, b, c)
	t_0 = Float64(Float64((a ^ 2.0) / (b ^ 3.0)) * -0.375)
	t_1 = Float64(Float64((a ^ 4.0) / (b ^ 6.0)) * 6.328125)
	t_2 = Float64(t_1 / a)
	t_3 = fma(-0.75, Float64(Float64(a * t_0) / (b ^ 2.0)), fma(-0.2222222222222222, Float64(b * t_2), Float64(Float64((a ^ 3.0) / (b ^ 5.0)) * 0.5625)))
	t_4 = fma(-1.125, Float64(Float64((a ^ 2.0) * t_0) / (b ^ 4.0)), fma(-0.75, Float64(a * Float64(t_3 / (b ^ 2.0))), fma(-0.2222222222222222, Float64(b * Float64(fma(1.5, Float64(a * Float64(t_1 / (b ^ 2.0))), Float64(3.796875 * Float64((a ^ 5.0) / (b ^ 8.0)))) / a)), Float64(Float64(t_1 / b) * 0.16666666666666666))))
	return Float64(1.0 / Float64(fma(-2.0, b, Float64(c * fma(1.5, Float64(a / b), Float64(c * fma(-3.0, t_0, Float64(c * fma(-3.0, t_3, Float64(c * Float64(-3.0 * Float64(t_4 + Float64(c * fma(-1.125, Float64((a ^ 2.0) * Float64(t_3 / (b ^ 4.0))), fma(-0.75, Float64(a * Float64(t_4 / (b ^ 2.0))), fma(-0.3333333333333333, Float64(t_0 * t_2), Float64(-4.4296875 * Float64((a ^ 5.0) / (b ^ 9.0))))))))))))))))) / c))
end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(N[Power[a, 2.0], $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] * -0.375), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Power[a, 4.0], $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision] * 6.328125), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / a), $MachinePrecision]}, Block[{t$95$3 = N[(-0.75 * N[(N[(a * t$95$0), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] + N[(-0.2222222222222222 * N[(b * t$95$2), $MachinePrecision] + N[(N[(N[Power[a, 3.0], $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision] * 0.5625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-1.125 * N[(N[(N[Power[a, 2.0], $MachinePrecision] * t$95$0), $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-0.75 * N[(a * N[(t$95$3 / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.2222222222222222 * N[(b * N[(N[(1.5 * N[(a * N[(t$95$1 / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.796875 * N[(N[Power[a, 5.0], $MachinePrecision] / N[Power[b, 8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 / b), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(1.0 / N[(N[(-2.0 * b + N[(c * N[(1.5 * N[(a / b), $MachinePrecision] + N[(c * N[(-3.0 * t$95$0 + N[(c * N[(-3.0 * t$95$3 + N[(c * N[(-3.0 * N[(t$95$4 + N[(c * N[(-1.125 * N[(N[Power[a, 2.0], $MachinePrecision] * N[(t$95$3 / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.75 * N[(a * N[(t$95$4 / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(t$95$0 * t$95$2), $MachinePrecision] + N[(-4.4296875 * N[(N[Power[a, 5.0], $MachinePrecision] / N[Power[b, 9.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{{a}^{2}}{{b}^{3}} \cdot -0.375\\
t_1 := \frac{{a}^{4}}{{b}^{6}} \cdot 6.328125\\
t_2 := \frac{t\_1}{a}\\
t_3 := \mathsf{fma}\left(-0.75, \frac{a \cdot t\_0}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot t\_2, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)\\
t_4 := \mathsf{fma}\left(-1.125, \frac{{a}^{2} \cdot t\_0}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{t\_3}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\mathsf{fma}\left(1.5, a \cdot \frac{t\_1}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{a}, \frac{t\_1}{b} \cdot 0.16666666666666666\right)\right)\right)\\
\frac{1}{\frac{\mathsf{fma}\left(-2, b, c \cdot \mathsf{fma}\left(1.5, \frac{a}{b}, c \cdot \mathsf{fma}\left(-3, t\_0, c \cdot \mathsf{fma}\left(-3, t\_3, c \cdot \left(-3 \cdot \left(t\_4 + c \cdot \mathsf{fma}\left(-1.125, {a}^{2} \cdot \frac{t\_3}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{t\_4}{{b}^{2}}, \mathsf{fma}\left(-0.3333333333333333, t\_0 \cdot t\_2, -4.4296875 \cdot \frac{{a}^{5}}{{b}^{9}}\right)\right)\right)\right)\right)\right)\right)\right)\right)}{c}}
\end{array}
\end{array}
Derivation
  1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{1}{\color{blue}{\frac{-2 \cdot b + c \cdot \left(1.5 \cdot \frac{a}{b} + c \cdot \left(-3 \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right) + c \cdot \left(-3 \cdot \left(-0.75 \cdot \frac{a \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right)}{{b}^{2}} + \left(-0.2222222222222222 \cdot \frac{b \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{a} + 0.5625 \cdot \frac{{a}^{3}}{{b}^{5}}\right)\right) + c \cdot \left(-3 \cdot \left(c \cdot \left(-1.125 \cdot \frac{{a}^{2} \cdot \left(-0.75 \cdot \frac{a \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right)}{{b}^{2}} + \left(-0.2222222222222222 \cdot \frac{b \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{a} + 0.5625 \cdot \frac{{a}^{3}}{{b}^{5}}\right)\right)}{{b}^{4}} + \left(-0.75 \cdot \frac{a \cdot \left(-1.125 \cdot \frac{{a}^{2} \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right)}{{b}^{4}} + \left(-0.75 \cdot \frac{a \cdot \left(-0.75 \cdot \frac{a \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right)}{{b}^{2}} + \left(-0.2222222222222222 \cdot \frac{b \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{a} + 0.5625 \cdot \frac{{a}^{3}}{{b}^{5}}\right)\right)}{{b}^{2}} + \left(-0.2222222222222222 \cdot \frac{b \cdot \left(1.5 \cdot \frac{a \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{{b}^{2}} + 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{a} + 0.16666666666666666 \cdot \frac{1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}}{b}\right)\right)\right)}{{b}^{2}} + \left(-0.3333333333333333 \cdot \frac{\left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right) \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{a} + \left(-0.2222222222222222 \cdot \frac{b \cdot \left(1.125 \cdot \frac{{a}^{2} \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{{b}^{4}} + \left(1.5 \cdot \frac{a \cdot \left(1.5 \cdot \frac{a \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{{b}^{2}} + 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{{b}^{2}} + 2.84765625 \cdot \frac{{a}^{6}}{{b}^{10}}\right)\right)}{a} + 0.16666666666666666 \cdot \frac{1.5 \cdot \frac{a \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{{b}^{2}} + 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}}{b}\right)\right)\right)\right)\right) + -3 \cdot \left(-1.125 \cdot \frac{{a}^{2} \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right)}{{b}^{4}} + \left(-0.75 \cdot \frac{a \cdot \left(-0.75 \cdot \frac{a \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right)}{{b}^{2}} + \left(-0.2222222222222222 \cdot \frac{b \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{a} + 0.5625 \cdot \frac{{a}^{3}}{{b}^{5}}\right)\right)}{{b}^{2}} + \left(-0.2222222222222222 \cdot \frac{b \cdot \left(1.5 \cdot \frac{a \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{{b}^{2}} + 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{a} + 0.16666666666666666 \cdot \frac{1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}}{b}\right)\right)\right)\right)\right)\right)\right)}{c}}} \]
  11. Simplified94.1%

    \[\leadsto \frac{1}{\color{blue}{\frac{\mathsf{fma}\left(-2, b, c \cdot \mathsf{fma}\left(1.5, \frac{a}{b}, c \cdot \mathsf{fma}\left(-3, \frac{{a}^{2}}{{b}^{3}} \cdot -0.375, c \cdot \mathsf{fma}\left(-3, \mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right), c \cdot \left(-3 \cdot \left(c \cdot \mathsf{fma}\left(-1.125, {a}^{2} \cdot \frac{\mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{\mathsf{fma}\left(-1.125, \frac{{a}^{2} \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{\mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{a}, \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b} \cdot 0.16666666666666666\right)\right)\right)}{{b}^{2}}, \mathsf{fma}\left(-0.3333333333333333, \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right) \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\mathsf{fma}\left(1.125, {a}^{2} \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{4}}, \mathsf{fma}\left(1.5, a \cdot \frac{\mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{{b}^{2}}, \frac{2.84765625 \cdot {a}^{6}}{{b}^{10}}\right)\right)}{a}, \frac{0.16666666666666666 \cdot \mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{b}\right)\right)\right)\right) + \mathsf{fma}\left(-1.125, \frac{{a}^{2} \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{\mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{a}, \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b} \cdot 0.16666666666666666\right)\right)\right)\right)\right)\right)\right)\right)\right)}{c}}} \]
  12. Taylor expanded in a around 0 94.1%

    \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(-2, b, c \cdot \mathsf{fma}\left(1.5, \frac{a}{b}, c \cdot \mathsf{fma}\left(-3, \frac{{a}^{2}}{{b}^{3}} \cdot -0.375, c \cdot \mathsf{fma}\left(-3, \mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right), c \cdot \left(-3 \cdot \left(c \cdot \mathsf{fma}\left(-1.125, {a}^{2} \cdot \frac{\mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{\mathsf{fma}\left(-1.125, \frac{{a}^{2} \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{\mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{a}, \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b} \cdot 0.16666666666666666\right)\right)\right)}{{b}^{2}}, \mathsf{fma}\left(-0.3333333333333333, \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right) \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \color{blue}{-4.4296875 \cdot \frac{{a}^{5}}{{b}^{9}}}\right)\right)\right) + \mathsf{fma}\left(-1.125, \frac{{a}^{2} \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{\mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{a}, \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b} \cdot 0.16666666666666666\right)\right)\right)\right)\right)\right)\right)\right)\right)}{c}} \]
  13. Final simplification94.1%

    \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(-2, b, c \cdot \mathsf{fma}\left(1.5, \frac{a}{b}, c \cdot \mathsf{fma}\left(-3, \frac{{a}^{2}}{{b}^{3}} \cdot -0.375, c \cdot \mathsf{fma}\left(-3, \mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right), c \cdot \left(-3 \cdot \left(\mathsf{fma}\left(-1.125, \frac{{a}^{2} \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{\mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{a}, \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b} \cdot 0.16666666666666666\right)\right)\right) + c \cdot \mathsf{fma}\left(-1.125, {a}^{2} \cdot \frac{\mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{\mathsf{fma}\left(-1.125, \frac{{a}^{2} \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{4}}, \mathsf{fma}\left(-0.75, a \cdot \frac{\mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{a}, \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b} \cdot 0.16666666666666666\right)\right)\right)}{{b}^{2}}, \mathsf{fma}\left(-0.3333333333333333, \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right) \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, -4.4296875 \cdot \frac{{a}^{5}}{{b}^{9}}\right)\right)\right)\right)\right)\right)\right)\right)\right)}{c}} \]
  14. Add Preprocessing

Alternative 2: 94.0% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 6.328125 \cdot \frac{{c}^{4}}{{b}^{6}}\\ t_1 := \mathsf{fma}\left(1.5, \frac{c \cdot t\_0}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)\\ \mathsf{fma}\left(-0.5, \frac{c}{b}, a \cdot \mathsf{fma}\left(-0.375, \frac{{c}^{2}}{{b}^{3}}, a \cdot \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{{b}^{5}}, a \cdot \mathsf{fma}\left(-0.16666666666666666, \frac{t\_0}{b}, a \cdot \left(-0.16666666666666666 \cdot \left(a \cdot \frac{\mathsf{fma}\left(1.125, \frac{\frac{6.328125 \cdot {c}^{6}}{{b}^{6}}}{{b}^{4}}, \mathsf{fma}\left(1.5, c \cdot \frac{t\_1}{{b}^{2}}, \frac{{c}^{6} \cdot 2.84765625}{{b}^{10}}\right)\right)}{b} + \frac{t\_1}{b}\right)\right)\right)\right)\right)\right) \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* 6.328125 (/ (pow c 4.0) (pow b 6.0))))
        (t_1
         (fma
          1.5
          (/ (* c t_0) (pow b 2.0))
          (* 3.796875 (/ (pow c 5.0) (pow b 8.0))))))
   (fma
    -0.5
    (/ c b)
    (*
     a
     (fma
      -0.375
      (/ (pow c 2.0) (pow b 3.0))
      (*
       a
       (fma
        -0.5625
        (/ (pow c 3.0) (pow b 5.0))
        (*
         a
         (fma
          -0.16666666666666666
          (/ t_0 b)
          (*
           a
           (*
            -0.16666666666666666
            (+
             (*
              a
              (/
               (fma
                1.125
                (/ (/ (* 6.328125 (pow c 6.0)) (pow b 6.0)) (pow b 4.0))
                (fma
                 1.5
                 (* c (/ t_1 (pow b 2.0)))
                 (/ (* (pow c 6.0) 2.84765625) (pow b 10.0))))
               b))
             (/ t_1 b)))))))))))))
double code(double a, double b, double c) {
	double t_0 = 6.328125 * (pow(c, 4.0) / pow(b, 6.0));
	double t_1 = fma(1.5, ((c * t_0) / pow(b, 2.0)), (3.796875 * (pow(c, 5.0) / pow(b, 8.0))));
	return fma(-0.5, (c / b), (a * fma(-0.375, (pow(c, 2.0) / pow(b, 3.0)), (a * fma(-0.5625, (pow(c, 3.0) / pow(b, 5.0)), (a * fma(-0.16666666666666666, (t_0 / b), (a * (-0.16666666666666666 * ((a * (fma(1.125, (((6.328125 * pow(c, 6.0)) / pow(b, 6.0)) / pow(b, 4.0)), fma(1.5, (c * (t_1 / pow(b, 2.0))), ((pow(c, 6.0) * 2.84765625) / pow(b, 10.0)))) / b)) + (t_1 / b)))))))))));
}
function code(a, b, c)
	t_0 = Float64(6.328125 * Float64((c ^ 4.0) / (b ^ 6.0)))
	t_1 = fma(1.5, Float64(Float64(c * t_0) / (b ^ 2.0)), Float64(3.796875 * Float64((c ^ 5.0) / (b ^ 8.0))))
	return fma(-0.5, Float64(c / b), Float64(a * fma(-0.375, Float64((c ^ 2.0) / (b ^ 3.0)), Float64(a * fma(-0.5625, Float64((c ^ 3.0) / (b ^ 5.0)), Float64(a * fma(-0.16666666666666666, Float64(t_0 / b), Float64(a * Float64(-0.16666666666666666 * Float64(Float64(a * Float64(fma(1.125, Float64(Float64(Float64(6.328125 * (c ^ 6.0)) / (b ^ 6.0)) / (b ^ 4.0)), fma(1.5, Float64(c * Float64(t_1 / (b ^ 2.0))), Float64(Float64((c ^ 6.0) * 2.84765625) / (b ^ 10.0)))) / b)) + Float64(t_1 / b)))))))))))
end
code[a_, b_, c_] := Block[{t$95$0 = N[(6.328125 * N[(N[Power[c, 4.0], $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.5 * N[(N[(c * t$95$0), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] + N[(3.796875 * N[(N[Power[c, 5.0], $MachinePrecision] / N[Power[b, 8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(-0.5 * N[(c / b), $MachinePrecision] + N[(a * N[(-0.375 * N[(N[Power[c, 2.0], $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] + N[(a * N[(-0.5625 * N[(N[Power[c, 3.0], $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision] + N[(a * N[(-0.16666666666666666 * N[(t$95$0 / b), $MachinePrecision] + N[(a * N[(-0.16666666666666666 * N[(N[(a * N[(N[(1.125 * N[(N[(N[(6.328125 * N[Power[c, 6.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(c * N[(t$95$1 / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[c, 6.0], $MachinePrecision] * 2.84765625), $MachinePrecision] / N[Power[b, 10.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 6.328125 \cdot \frac{{c}^{4}}{{b}^{6}}\\
t_1 := \mathsf{fma}\left(1.5, \frac{c \cdot t\_0}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)\\
\mathsf{fma}\left(-0.5, \frac{c}{b}, a \cdot \mathsf{fma}\left(-0.375, \frac{{c}^{2}}{{b}^{3}}, a \cdot \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{{b}^{5}}, a \cdot \mathsf{fma}\left(-0.16666666666666666, \frac{t\_0}{b}, a \cdot \left(-0.16666666666666666 \cdot \left(a \cdot \frac{\mathsf{fma}\left(1.125, \frac{\frac{6.328125 \cdot {c}^{6}}{{b}^{6}}}{{b}^{4}}, \mathsf{fma}\left(1.5, c \cdot \frac{t\_1}{{b}^{2}}, \frac{{c}^{6} \cdot 2.84765625}{{b}^{10}}\right)\right)}{b} + \frac{t\_1}{b}\right)\right)\right)\right)\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + a \cdot \left(-0.375 \cdot \frac{{c}^{2}}{{b}^{3}} + a \cdot \left(-0.5625 \cdot \frac{{c}^{3}}{{b}^{5}} + a \cdot \left(-0.16666666666666666 \cdot \frac{1.265625 \cdot \frac{{c}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{c}^{4}}{{b}^{6}}}{b} + a \cdot \left(-0.16666666666666666 \cdot \frac{a \cdot \left(1.125 \cdot \frac{{c}^{2} \cdot \left(1.265625 \cdot \frac{{c}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{{b}^{4}} + \left(1.5 \cdot \frac{c \cdot \left(1.5 \cdot \frac{c \cdot \left(1.265625 \cdot \frac{{c}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{{b}^{2}} + 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{{b}^{2}} + 2.84765625 \cdot \frac{{c}^{6}}{{b}^{10}}\right)\right)}{b} + -0.16666666666666666 \cdot \frac{1.5 \cdot \frac{c \cdot \left(1.265625 \cdot \frac{{c}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{{b}^{2}} + 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}}{b}\right)\right)\right)\right)} \]
  6. Simplified93.9%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{b}, a \cdot \mathsf{fma}\left(-0.375, \frac{{c}^{2}}{{b}^{3}}, a \cdot \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{{b}^{5}}, a \cdot \mathsf{fma}\left(-0.16666666666666666, \frac{\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125}{b}, a \cdot \left(-0.16666666666666666 \cdot \left(a \cdot \frac{\mathsf{fma}\left(1.125, \frac{{c}^{2} \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125\right)}{{b}^{4}}, \mathsf{fma}\left(1.5, c \cdot \frac{\mathsf{fma}\left(1.5, \frac{c \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{{b}^{2}}, \frac{2.84765625 \cdot {c}^{6}}{{b}^{10}}\right)\right)}{b} + \frac{\mathsf{fma}\left(1.5, \frac{c \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{b}\right)\right)\right)\right)\right)\right)} \]
  7. Taylor expanded in c around 0 93.9%

    \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, a \cdot \mathsf{fma}\left(-0.375, \frac{{c}^{2}}{{b}^{3}}, a \cdot \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{{b}^{5}}, a \cdot \mathsf{fma}\left(-0.16666666666666666, \frac{\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125}{b}, a \cdot \left(-0.16666666666666666 \cdot \left(a \cdot \frac{\mathsf{fma}\left(1.125, \frac{\color{blue}{6.328125 \cdot \frac{{c}^{6}}{{b}^{6}}}}{{b}^{4}}, \mathsf{fma}\left(1.5, c \cdot \frac{\mathsf{fma}\left(1.5, \frac{c \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{{b}^{2}}, \frac{2.84765625 \cdot {c}^{6}}{{b}^{10}}\right)\right)}{b} + \frac{\mathsf{fma}\left(1.5, \frac{c \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{b}\right)\right)\right)\right)\right)\right) \]
  8. Step-by-step derivation
    1. associate-*r/93.9%

      \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, a \cdot \mathsf{fma}\left(-0.375, \frac{{c}^{2}}{{b}^{3}}, a \cdot \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{{b}^{5}}, a \cdot \mathsf{fma}\left(-0.16666666666666666, \frac{\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125}{b}, a \cdot \left(-0.16666666666666666 \cdot \left(a \cdot \frac{\mathsf{fma}\left(1.125, \frac{\color{blue}{\frac{6.328125 \cdot {c}^{6}}{{b}^{6}}}}{{b}^{4}}, \mathsf{fma}\left(1.5, c \cdot \frac{\mathsf{fma}\left(1.5, \frac{c \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{{b}^{2}}, \frac{2.84765625 \cdot {c}^{6}}{{b}^{10}}\right)\right)}{b} + \frac{\mathsf{fma}\left(1.5, \frac{c \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{b}\right)\right)\right)\right)\right)\right) \]
  9. Simplified93.9%

    \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, a \cdot \mathsf{fma}\left(-0.375, \frac{{c}^{2}}{{b}^{3}}, a \cdot \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{{b}^{5}}, a \cdot \mathsf{fma}\left(-0.16666666666666666, \frac{\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125}{b}, a \cdot \left(-0.16666666666666666 \cdot \left(a \cdot \frac{\mathsf{fma}\left(1.125, \frac{\color{blue}{\frac{6.328125 \cdot {c}^{6}}{{b}^{6}}}}{{b}^{4}}, \mathsf{fma}\left(1.5, c \cdot \frac{\mathsf{fma}\left(1.5, \frac{c \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{{b}^{2}}, \frac{2.84765625 \cdot {c}^{6}}{{b}^{10}}\right)\right)}{b} + \frac{\mathsf{fma}\left(1.5, \frac{c \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{b}\right)\right)\right)\right)\right)\right) \]
  10. Final simplification93.9%

    \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, a \cdot \mathsf{fma}\left(-0.375, \frac{{c}^{2}}{{b}^{3}}, a \cdot \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{{b}^{5}}, a \cdot \mathsf{fma}\left(-0.16666666666666666, \frac{6.328125 \cdot \frac{{c}^{4}}{{b}^{6}}}{b}, a \cdot \left(-0.16666666666666666 \cdot \left(a \cdot \frac{\mathsf{fma}\left(1.125, \frac{\frac{6.328125 \cdot {c}^{6}}{{b}^{6}}}{{b}^{4}}, \mathsf{fma}\left(1.5, c \cdot \frac{\mathsf{fma}\left(1.5, \frac{c \cdot \left(6.328125 \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{{b}^{2}}, \frac{{c}^{6} \cdot 2.84765625}{{b}^{10}}\right)\right)}{b} + \frac{\mathsf{fma}\left(1.5, \frac{c \cdot \left(6.328125 \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{b}\right)\right)\right)\right)\right)\right) \]
  11. Add Preprocessing

Alternative 3: 93.8% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{{a}^{4}}{{b}^{6}} \cdot 6.328125\\ t_1 := \mathsf{fma}\left(1.5, a \cdot \frac{t\_0}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)\\ c \cdot \left(c \cdot \mathsf{fma}\left(-0.375, \frac{a}{{b}^{3}}, c \cdot \mathsf{fma}\left(-0.5625, \frac{{a}^{2}}{{b}^{5}}, c \cdot \mathsf{fma}\left(-0.16666666666666666, \frac{t\_0}{b \cdot a}, c \cdot \left(-0.16666666666666666 \cdot \left(c \cdot \frac{\mathsf{fma}\left(1.125, {a}^{2} \cdot \frac{t\_0}{{b}^{4}}, \mathsf{fma}\left(1.5, a \cdot \frac{t\_1}{{b}^{2}}, \frac{2.84765625 \cdot {a}^{6}}{{b}^{10}}\right)\right)}{b \cdot a} + \frac{t\_1}{b \cdot a}\right)\right)\right)\right)\right) - \frac{0.5}{b}\right) \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* (/ (pow a 4.0) (pow b 6.0)) 6.328125))
        (t_1
         (fma
          1.5
          (* a (/ t_0 (pow b 2.0)))
          (* 3.796875 (/ (pow a 5.0) (pow b 8.0))))))
   (*
    c
    (-
     (*
      c
      (fma
       -0.375
       (/ a (pow b 3.0))
       (*
        c
        (fma
         -0.5625
         (/ (pow a 2.0) (pow b 5.0))
         (*
          c
          (fma
           -0.16666666666666666
           (/ t_0 (* b a))
           (*
            c
            (*
             -0.16666666666666666
             (+
              (*
               c
               (/
                (fma
                 1.125
                 (* (pow a 2.0) (/ t_0 (pow b 4.0)))
                 (fma
                  1.5
                  (* a (/ t_1 (pow b 2.0)))
                  (/ (* 2.84765625 (pow a 6.0)) (pow b 10.0))))
                (* b a)))
              (/ t_1 (* b a)))))))))))
     (/ 0.5 b)))))
double code(double a, double b, double c) {
	double t_0 = (pow(a, 4.0) / pow(b, 6.0)) * 6.328125;
	double t_1 = fma(1.5, (a * (t_0 / pow(b, 2.0))), (3.796875 * (pow(a, 5.0) / pow(b, 8.0))));
	return c * ((c * fma(-0.375, (a / pow(b, 3.0)), (c * fma(-0.5625, (pow(a, 2.0) / pow(b, 5.0)), (c * fma(-0.16666666666666666, (t_0 / (b * a)), (c * (-0.16666666666666666 * ((c * (fma(1.125, (pow(a, 2.0) * (t_0 / pow(b, 4.0))), fma(1.5, (a * (t_1 / pow(b, 2.0))), ((2.84765625 * pow(a, 6.0)) / pow(b, 10.0)))) / (b * a))) + (t_1 / (b * a))))))))))) - (0.5 / b));
}
function code(a, b, c)
	t_0 = Float64(Float64((a ^ 4.0) / (b ^ 6.0)) * 6.328125)
	t_1 = fma(1.5, Float64(a * Float64(t_0 / (b ^ 2.0))), Float64(3.796875 * Float64((a ^ 5.0) / (b ^ 8.0))))
	return Float64(c * Float64(Float64(c * fma(-0.375, Float64(a / (b ^ 3.0)), Float64(c * fma(-0.5625, Float64((a ^ 2.0) / (b ^ 5.0)), Float64(c * fma(-0.16666666666666666, Float64(t_0 / Float64(b * a)), Float64(c * Float64(-0.16666666666666666 * Float64(Float64(c * Float64(fma(1.125, Float64((a ^ 2.0) * Float64(t_0 / (b ^ 4.0))), fma(1.5, Float64(a * Float64(t_1 / (b ^ 2.0))), Float64(Float64(2.84765625 * (a ^ 6.0)) / (b ^ 10.0)))) / Float64(b * a))) + Float64(t_1 / Float64(b * a))))))))))) - Float64(0.5 / b)))
end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(N[Power[a, 4.0], $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision] * 6.328125), $MachinePrecision]}, Block[{t$95$1 = N[(1.5 * N[(a * N[(t$95$0 / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.796875 * N[(N[Power[a, 5.0], $MachinePrecision] / N[Power[b, 8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c * N[(N[(c * N[(-0.375 * N[(a / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] + N[(c * N[(-0.5625 * N[(N[Power[a, 2.0], $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision] + N[(c * N[(-0.16666666666666666 * N[(t$95$0 / N[(b * a), $MachinePrecision]), $MachinePrecision] + N[(c * N[(-0.16666666666666666 * N[(N[(c * N[(N[(1.125 * N[(N[Power[a, 2.0], $MachinePrecision] * N[(t$95$0 / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a * N[(t$95$1 / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.84765625 * N[Power[a, 6.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 10.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.5 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{{a}^{4}}{{b}^{6}} \cdot 6.328125\\
t_1 := \mathsf{fma}\left(1.5, a \cdot \frac{t\_0}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)\\
c \cdot \left(c \cdot \mathsf{fma}\left(-0.375, \frac{a}{{b}^{3}}, c \cdot \mathsf{fma}\left(-0.5625, \frac{{a}^{2}}{{b}^{5}}, c \cdot \mathsf{fma}\left(-0.16666666666666666, \frac{t\_0}{b \cdot a}, c \cdot \left(-0.16666666666666666 \cdot \left(c \cdot \frac{\mathsf{fma}\left(1.125, {a}^{2} \cdot \frac{t\_0}{{b}^{4}}, \mathsf{fma}\left(1.5, a \cdot \frac{t\_1}{{b}^{2}}, \frac{2.84765625 \cdot {a}^{6}}{{b}^{10}}\right)\right)}{b \cdot a} + \frac{t\_1}{b \cdot a}\right)\right)\right)\right)\right) - \frac{0.5}{b}\right)
\end{array}
\end{array}
Derivation
  1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(-0.375 \cdot \frac{a}{{b}^{3}} + c \cdot \left(-0.5625 \cdot \frac{{a}^{2}}{{b}^{5}} + c \cdot \left(-0.16666666666666666 \cdot \frac{1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}}{a \cdot b} + c \cdot \left(-0.16666666666666666 \cdot \frac{c \cdot \left(1.125 \cdot \frac{{a}^{2} \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{{b}^{4}} + \left(1.5 \cdot \frac{a \cdot \left(1.5 \cdot \frac{a \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{{b}^{2}} + 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{{b}^{2}} + 2.84765625 \cdot \frac{{a}^{6}}{{b}^{10}}\right)\right)}{a \cdot b} + -0.16666666666666666 \cdot \frac{1.5 \cdot \frac{a \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{{b}^{2}} + 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}}{a \cdot b}\right)\right)\right)\right) - 0.5 \cdot \frac{1}{b}\right)} \]
  11. Simplified93.8%

    \[\leadsto \color{blue}{c \cdot \left(c \cdot \mathsf{fma}\left(-0.375, \frac{a}{{b}^{3}}, c \cdot \mathsf{fma}\left(-0.5625, \frac{{a}^{2}}{{b}^{5}}, c \cdot \mathsf{fma}\left(-0.16666666666666666, \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b \cdot a}, c \cdot \left(-0.16666666666666666 \cdot \left(c \cdot \frac{\mathsf{fma}\left(1.125, {a}^{2} \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{4}}, \mathsf{fma}\left(1.5, a \cdot \frac{\mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{{b}^{2}}, \frac{2.84765625 \cdot {a}^{6}}{{b}^{10}}\right)\right)}{b \cdot a} + \frac{\mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{b \cdot a}\right)\right)\right)\right)\right) - \frac{0.5}{b}\right)} \]
  12. Final simplification93.8%

    \[\leadsto c \cdot \left(c \cdot \mathsf{fma}\left(-0.375, \frac{a}{{b}^{3}}, c \cdot \mathsf{fma}\left(-0.5625, \frac{{a}^{2}}{{b}^{5}}, c \cdot \mathsf{fma}\left(-0.16666666666666666, \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b \cdot a}, c \cdot \left(-0.16666666666666666 \cdot \left(c \cdot \frac{\mathsf{fma}\left(1.125, {a}^{2} \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{4}}, \mathsf{fma}\left(1.5, a \cdot \frac{\mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{{b}^{2}}, \frac{2.84765625 \cdot {a}^{6}}{{b}^{10}}\right)\right)}{b \cdot a} + \frac{\mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{b \cdot a}\right)\right)\right)\right)\right) - \frac{0.5}{b}\right) \]
  13. Add Preprocessing

Alternative 4: 92.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 6.328125 \cdot \frac{{c}^{4}}{{b}^{6}}\\ \mathsf{fma}\left(-0.5, \frac{c}{b}, a \cdot \mathsf{fma}\left(-0.375, \frac{{c}^{2}}{{b}^{3}}, a \cdot \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{{b}^{5}}, a \cdot \left(-0.16666666666666666 \cdot \left(\frac{t\_0}{b} + \frac{a \cdot \mathsf{fma}\left(1.5, \frac{c \cdot t\_0}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{b}\right)\right)\right)\right)\right) \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* 6.328125 (/ (pow c 4.0) (pow b 6.0)))))
   (fma
    -0.5
    (/ c b)
    (*
     a
     (fma
      -0.375
      (/ (pow c 2.0) (pow b 3.0))
      (*
       a
       (fma
        -0.5625
        (/ (pow c 3.0) (pow b 5.0))
        (*
         a
         (*
          -0.16666666666666666
          (+
           (/ t_0 b)
           (/
            (*
             a
             (fma
              1.5
              (/ (* c t_0) (pow b 2.0))
              (* 3.796875 (/ (pow c 5.0) (pow b 8.0)))))
            b)))))))))))
double code(double a, double b, double c) {
	double t_0 = 6.328125 * (pow(c, 4.0) / pow(b, 6.0));
	return fma(-0.5, (c / b), (a * fma(-0.375, (pow(c, 2.0) / pow(b, 3.0)), (a * fma(-0.5625, (pow(c, 3.0) / pow(b, 5.0)), (a * (-0.16666666666666666 * ((t_0 / b) + ((a * fma(1.5, ((c * t_0) / pow(b, 2.0)), (3.796875 * (pow(c, 5.0) / pow(b, 8.0))))) / b)))))))));
}
function code(a, b, c)
	t_0 = Float64(6.328125 * Float64((c ^ 4.0) / (b ^ 6.0)))
	return fma(-0.5, Float64(c / b), Float64(a * fma(-0.375, Float64((c ^ 2.0) / (b ^ 3.0)), Float64(a * fma(-0.5625, Float64((c ^ 3.0) / (b ^ 5.0)), Float64(a * Float64(-0.16666666666666666 * Float64(Float64(t_0 / b) + Float64(Float64(a * fma(1.5, Float64(Float64(c * t_0) / (b ^ 2.0)), Float64(3.796875 * Float64((c ^ 5.0) / (b ^ 8.0))))) / b)))))))))
end
code[a_, b_, c_] := Block[{t$95$0 = N[(6.328125 * N[(N[Power[c, 4.0], $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(-0.5 * N[(c / b), $MachinePrecision] + N[(a * N[(-0.375 * N[(N[Power[c, 2.0], $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] + N[(a * N[(-0.5625 * N[(N[Power[c, 3.0], $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision] + N[(a * N[(-0.16666666666666666 * N[(N[(t$95$0 / b), $MachinePrecision] + N[(N[(a * N[(1.5 * N[(N[(c * t$95$0), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] + N[(3.796875 * N[(N[Power[c, 5.0], $MachinePrecision] / N[Power[b, 8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 6.328125 \cdot \frac{{c}^{4}}{{b}^{6}}\\
\mathsf{fma}\left(-0.5, \frac{c}{b}, a \cdot \mathsf{fma}\left(-0.375, \frac{{c}^{2}}{{b}^{3}}, a \cdot \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{{b}^{5}}, a \cdot \left(-0.16666666666666666 \cdot \left(\frac{t\_0}{b} + \frac{a \cdot \mathsf{fma}\left(1.5, \frac{c \cdot t\_0}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{b}\right)\right)\right)\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{b}, a \cdot \mathsf{fma}\left(-0.375, \frac{{c}^{2}}{{b}^{3}}, a \cdot \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{{b}^{5}}, a \cdot \left(-0.16666666666666666 \cdot \left(\frac{a \cdot \mathsf{fma}\left(1.5, \frac{c \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{b} + \frac{\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125}{b}\right)\right)\right)\right)\right)} \]
  7. Final simplification92.5%

    \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, a \cdot \mathsf{fma}\left(-0.375, \frac{{c}^{2}}{{b}^{3}}, a \cdot \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{{b}^{5}}, a \cdot \left(-0.16666666666666666 \cdot \left(\frac{6.328125 \cdot \frac{{c}^{4}}{{b}^{6}}}{b} + \frac{a \cdot \mathsf{fma}\left(1.5, \frac{c \cdot \left(6.328125 \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{{b}^{2}}, 3.796875 \cdot \frac{{c}^{5}}{{b}^{8}}\right)}{b}\right)\right)\right)\right)\right) \]
  8. Add Preprocessing

Alternative 5: 92.2% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(-2, b, c \cdot \mathsf{fma}\left(1.5, \frac{a}{b}, c \cdot \left(-3 \cdot \left(t\_1 + c \cdot \mathsf{fma}\left(-0.75, \frac{a \cdot t\_1}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)\right)\right)\right)\right)}{c}}\\


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

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{3 \cdot \frac{a}{\log \color{blue}{\left(e^{\sqrt{c \cdot \left(\frac{{b}^{2}}{c} + -3 \cdot a\right)}} \cdot e^{-b}\right)}}} \]
      8. prod-exp48.4%

        \[\leadsto \frac{1}{3 \cdot \frac{a}{\log \color{blue}{\left(e^{\sqrt{c \cdot \left(\frac{{b}^{2}}{c} + -3 \cdot a\right)} + \left(-b\right)}\right)}}} \]
      9. rem-log-exp51.7%

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{-2 \cdot b + c \cdot \left(1.5 \cdot \frac{a}{b} + c \cdot \left(-3 \cdot \left(c \cdot \left(-0.75 \cdot \frac{a \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right)}{{b}^{2}} + \left(-0.2222222222222222 \cdot \frac{b \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{a} + 0.5625 \cdot \frac{{a}^{3}}{{b}^{5}}\right)\right)\right) + -3 \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right)\right)}{c}}} \]
    11. Simplified93.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3} \leq -0.45:\\ \;\;\;\;\frac{1}{3 \cdot \frac{a}{\frac{\mathsf{fma}\left(c, \mathsf{fma}\left(-3, a, \frac{{b}^{2}}{c}\right), -{b}^{2}\right)}{\mathsf{fma}\left(\sqrt{c}, \sqrt{\mathsf{fma}\left(-3, a, \frac{{b}^{2}}{c}\right)}, b\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(-2, b, c \cdot \mathsf{fma}\left(1.5, \frac{a}{b}, c \cdot \left(-3 \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375 + c \cdot \mathsf{fma}\left(-0.75, \frac{a \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right)}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{a}, \frac{{a}^{3}}{{b}^{5}} \cdot 0.5625\right)\right)\right)\right)\right)\right)}{c}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 92.2% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, a \cdot \mathsf{fma}\left(a, -3 \cdot \left(t\_1 + a \cdot \mathsf{fma}\left(-0.75, c \cdot \frac{t\_1}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{6.328125 \cdot \frac{{c}^{4}}{{b}^{6}}}{{c}^{2}}, 0.5625 \cdot \frac{{c}^{2}}{{b}^{5}}\right)\right)\right), \frac{1.5}{b}\right)\right)}\\


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

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{3 \cdot \frac{a}{\log \color{blue}{\left(e^{\sqrt{c \cdot \left(\frac{{b}^{2}}{c} + -3 \cdot a\right)}} \cdot e^{-b}\right)}}} \]
      8. prod-exp48.4%

        \[\leadsto \frac{1}{3 \cdot \frac{a}{\log \color{blue}{\left(e^{\sqrt{c \cdot \left(\frac{{b}^{2}}{c} + -3 \cdot a\right)} + \left(-b\right)}\right)}}} \]
      9. rem-log-exp51.7%

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

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

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

      \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + a \cdot \left(a \cdot \left(-3 \cdot \left(a \cdot \left(-0.75 \cdot \frac{c \cdot \left(-0.75 \cdot \frac{c}{{b}^{3}} + 0.375 \cdot \frac{c}{{b}^{3}}\right)}{{b}^{2}} + \left(-0.2222222222222222 \cdot \frac{b \cdot \left(1.265625 \cdot \frac{{c}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{{c}^{2}} + 0.5625 \cdot \frac{{c}^{2}}{{b}^{5}}\right)\right)\right) + -3 \cdot \left(-0.75 \cdot \frac{c}{{b}^{3}} + 0.375 \cdot \frac{c}{{b}^{3}}\right)\right) + 1.5 \cdot \frac{1}{b}\right)}} \]
    11. Simplified93.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3} \leq -0.45:\\ \;\;\;\;\frac{1}{3 \cdot \frac{a}{\frac{\mathsf{fma}\left(c, \mathsf{fma}\left(-3, a, \frac{{b}^{2}}{c}\right), -{b}^{2}\right)}{\mathsf{fma}\left(\sqrt{c}, \sqrt{\mathsf{fma}\left(-3, a, \frac{{b}^{2}}{c}\right)}, b\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, a \cdot \mathsf{fma}\left(a, -3 \cdot \left(-0.375 \cdot \frac{c}{{b}^{3}} + a \cdot \mathsf{fma}\left(-0.75, c \cdot \frac{-0.375 \cdot \frac{c}{{b}^{3}}}{{b}^{2}}, \mathsf{fma}\left(-0.2222222222222222, b \cdot \frac{6.328125 \cdot \frac{{c}^{4}}{{b}^{6}}}{{c}^{2}}, 0.5625 \cdot \frac{{c}^{2}}{{b}^{5}}\right)\right)\right), \frac{1.5}{b}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 92.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{{a}^{4}}{{b}^{6}} \cdot 6.328125\\ c \cdot \left(c \cdot \mathsf{fma}\left(-0.375, \frac{a}{{b}^{3}}, c \cdot \mathsf{fma}\left(-0.5625, \frac{{a}^{2}}{{b}^{5}}, c \cdot \left(-0.16666666666666666 \cdot \left(\frac{t\_0}{b \cdot a} + \frac{c \cdot \mathsf{fma}\left(1.5, a \cdot \frac{t\_0}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{b \cdot a}\right)\right)\right)\right) - \frac{0.5}{b}\right) \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* (/ (pow a 4.0) (pow b 6.0)) 6.328125)))
   (*
    c
    (-
     (*
      c
      (fma
       -0.375
       (/ a (pow b 3.0))
       (*
        c
        (fma
         -0.5625
         (/ (pow a 2.0) (pow b 5.0))
         (*
          c
          (*
           -0.16666666666666666
           (+
            (/ t_0 (* b a))
            (/
             (*
              c
              (fma
               1.5
               (* a (/ t_0 (pow b 2.0)))
               (* 3.796875 (/ (pow a 5.0) (pow b 8.0)))))
             (* b a)))))))))
     (/ 0.5 b)))))
double code(double a, double b, double c) {
	double t_0 = (pow(a, 4.0) / pow(b, 6.0)) * 6.328125;
	return c * ((c * fma(-0.375, (a / pow(b, 3.0)), (c * fma(-0.5625, (pow(a, 2.0) / pow(b, 5.0)), (c * (-0.16666666666666666 * ((t_0 / (b * a)) + ((c * fma(1.5, (a * (t_0 / pow(b, 2.0))), (3.796875 * (pow(a, 5.0) / pow(b, 8.0))))) / (b * a))))))))) - (0.5 / b));
}
function code(a, b, c)
	t_0 = Float64(Float64((a ^ 4.0) / (b ^ 6.0)) * 6.328125)
	return Float64(c * Float64(Float64(c * fma(-0.375, Float64(a / (b ^ 3.0)), Float64(c * fma(-0.5625, Float64((a ^ 2.0) / (b ^ 5.0)), Float64(c * Float64(-0.16666666666666666 * Float64(Float64(t_0 / Float64(b * a)) + Float64(Float64(c * fma(1.5, Float64(a * Float64(t_0 / (b ^ 2.0))), Float64(3.796875 * Float64((a ^ 5.0) / (b ^ 8.0))))) / Float64(b * a))))))))) - Float64(0.5 / b)))
end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(N[Power[a, 4.0], $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision] * 6.328125), $MachinePrecision]}, N[(c * N[(N[(c * N[(-0.375 * N[(a / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] + N[(c * N[(-0.5625 * N[(N[Power[a, 2.0], $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision] + N[(c * N[(-0.16666666666666666 * N[(N[(t$95$0 / N[(b * a), $MachinePrecision]), $MachinePrecision] + N[(N[(c * N[(1.5 * N[(a * N[(t$95$0 / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.796875 * N[(N[Power[a, 5.0], $MachinePrecision] / N[Power[b, 8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.5 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{{a}^{4}}{{b}^{6}} \cdot 6.328125\\
c \cdot \left(c \cdot \mathsf{fma}\left(-0.375, \frac{a}{{b}^{3}}, c \cdot \mathsf{fma}\left(-0.5625, \frac{{a}^{2}}{{b}^{5}}, c \cdot \left(-0.16666666666666666 \cdot \left(\frac{t\_0}{b \cdot a} + \frac{c \cdot \mathsf{fma}\left(1.5, a \cdot \frac{t\_0}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{b \cdot a}\right)\right)\right)\right) - \frac{0.5}{b}\right)
\end{array}
\end{array}
Derivation
  1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(-0.375 \cdot \frac{a}{{b}^{3}} + c \cdot \left(-0.5625 \cdot \frac{{a}^{2}}{{b}^{5}} + c \cdot \left(-0.16666666666666666 \cdot \frac{c \cdot \left(1.5 \cdot \frac{a \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{{b}^{2}} + 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{a \cdot b} + -0.16666666666666666 \cdot \frac{1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}}{a \cdot b}\right)\right)\right) - 0.5 \cdot \frac{1}{b}\right)} \]
  11. Simplified92.5%

    \[\leadsto \color{blue}{c \cdot \left(c \cdot \mathsf{fma}\left(-0.375, \frac{a}{{b}^{3}}, c \cdot \mathsf{fma}\left(-0.5625, \frac{{a}^{2}}{{b}^{5}}, c \cdot \left(-0.16666666666666666 \cdot \left(\frac{c \cdot \mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{b \cdot a} + \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b \cdot a}\right)\right)\right)\right) - \frac{0.5}{b}\right)} \]
  12. Final simplification92.5%

    \[\leadsto c \cdot \left(c \cdot \mathsf{fma}\left(-0.375, \frac{a}{{b}^{3}}, c \cdot \mathsf{fma}\left(-0.5625, \frac{{a}^{2}}{{b}^{5}}, c \cdot \left(-0.16666666666666666 \cdot \left(\frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b \cdot a} + \frac{c \cdot \mathsf{fma}\left(1.5, a \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{{b}^{2}}, 3.796875 \cdot \frac{{a}^{5}}{{b}^{8}}\right)}{b \cdot a}\right)\right)\right)\right) - \frac{0.5}{b}\right) \]
  13. Add Preprocessing

Alternative 8: 92.0% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}} + \left(c \cdot -0.5 + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{2}} + -0.16666666666666666 \cdot \frac{1.265625 \cdot t\_1 + t\_1 \cdot 5.0625}{a \cdot {b}^{6}}\right)\right)}{b}\\


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

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 92.0% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{c \cdot \left(-1.5 \cdot \frac{a}{b} + c \cdot \left(-1.125 \cdot \frac{{a}^{2}}{{b}^{3}} + c \cdot \left(-1.6875 \cdot \frac{{a}^{3}}{{b}^{5}} + -0.5 \cdot \frac{c \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{b}\right)\right)\right)}}{3 \cdot a} \]
    6. Taylor expanded in a around 0 93.7%

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

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

Alternative 10: 92.0% accurate, 0.2× speedup?

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

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

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


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

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{c \cdot \left(-1.5 \cdot \frac{a}{b} + c \cdot \left(-1.125 \cdot \frac{{a}^{2}}{{b}^{3}} + c \cdot \left(-1.6875 \cdot \frac{{a}^{3}}{{b}^{5}} + -0.5 \cdot \frac{c \cdot \left(1.265625 \cdot \frac{{a}^{4}}{{b}^{6}} + 5.0625 \cdot \frac{{a}^{4}}{{b}^{6}}\right)}{b}\right)\right)\right)}}{3 \cdot a} \]
    6. Taylor expanded in a around 0 93.7%

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

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

Alternative 11: 91.8% accurate, 0.2× speedup?

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

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

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


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

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 90.2% accurate, 0.2× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(-2, b, c \cdot \mathsf{fma}\left(-3, c \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right), 1.5 \cdot \frac{a}{b}\right)\right)}{c}}\\


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

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{3 \cdot \frac{a}{\log \color{blue}{\left(e^{\sqrt{c \cdot \left(\frac{{b}^{2}}{c} + -3 \cdot a\right)}} \cdot e^{-b}\right)}}} \]
      8. prod-exp48.4%

        \[\leadsto \frac{1}{3 \cdot \frac{a}{\log \color{blue}{\left(e^{\sqrt{c \cdot \left(\frac{{b}^{2}}{c} + -3 \cdot a\right)} + \left(-b\right)}\right)}}} \]
      9. rem-log-exp51.7%

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{-2 \cdot b + c \cdot \left(-3 \cdot \left(c \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right) + 1.5 \cdot \frac{a}{b}\right)}{c}}} \]
    11. Step-by-step derivation
      1. fma-define91.3%

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

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(-2, b, c \cdot \color{blue}{\mathsf{fma}\left(-3, c \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right), 1.5 \cdot \frac{a}{b}\right)}\right)}{c}} \]
      3. distribute-rgt-out91.3%

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

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

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

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

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

Alternative 13: 89.9% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3} \leq -0.15:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(-2, b, c \cdot \mathsf{fma}\left(-3, c \cdot \left(\frac{{a}^{2}}{{b}^{3}} \cdot -0.375\right), 1.5 \cdot \frac{a}{b}\right)\right)}{c}}\\


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

    1. Initial program 83.2%

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

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

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

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

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

    1. Initial program 50.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{3 \cdot \frac{a}{\log \color{blue}{\left(e^{\sqrt{c \cdot \left(\frac{{b}^{2}}{c} + -3 \cdot a\right)}} \cdot e^{-b}\right)}}} \]
      8. prod-exp47.2%

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{-2 \cdot b + c \cdot \left(-3 \cdot \left(c \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right) + 1.5 \cdot \frac{a}{b}\right)}{c}}} \]
    11. Step-by-step derivation
      1. fma-define92.1%

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

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(-2, b, c \cdot \color{blue}{\mathsf{fma}\left(-3, c \cdot \left(-0.75 \cdot \frac{{a}^{2}}{{b}^{3}} + 0.375 \cdot \frac{{a}^{2}}{{b}^{3}}\right), 1.5 \cdot \frac{a}{b}\right)}\right)}{c}} \]
      3. distribute-rgt-out92.1%

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

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

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

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

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

Alternative 14: 89.9% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 83.2%

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

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

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

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

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

    1. Initial program 50.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{3 \cdot \frac{a}{\log \color{blue}{\left(e^{\sqrt{c \cdot \left(\frac{{b}^{2}}{c} + -3 \cdot a\right)}} \cdot e^{-b}\right)}}} \]
      8. prod-exp47.2%

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

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

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

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

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

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

Alternative 15: 85.9% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3} \leq -0.15:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}\\


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

    1. Initial program 83.2%

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

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

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

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

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

    1. Initial program 50.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{3 \cdot \frac{a}{\log \color{blue}{\left(e^{\sqrt{c \cdot \left(\frac{{b}^{2}}{c} + -3 \cdot a\right)}} \cdot e^{-b}\right)}}} \]
      8. prod-exp47.2%

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

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

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

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

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

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

Alternative 16: 85.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3} \leq -0.15:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= (/ (- (sqrt (- (* b b) (* c (* a 3.0)))) b) (* a 3.0)) -0.15)
   (/ (- (sqrt (- (* b b) (* 3.0 (* c a)))) b) (* a 3.0))
   (/ 1.0 (+ (* -2.0 (/ b c)) (* 1.5 (/ a b))))))
double code(double a, double b, double c) {
	double tmp;
	if (((sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0)) <= -0.15) {
		tmp = (sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
	} else {
		tmp = 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)));
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (((sqrt(((b * b) - (c * (a * 3.0d0)))) - b) / (a * 3.0d0)) <= (-0.15d0)) then
        tmp = (sqrt(((b * b) - (3.0d0 * (c * a)))) - b) / (a * 3.0d0)
    else
        tmp = 1.0d0 / (((-2.0d0) * (b / c)) + (1.5d0 * (a / b)))
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (((Math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0)) <= -0.15) {
		tmp = (Math.sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
	} else {
		tmp = 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)));
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if ((math.sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0)) <= -0.15:
		tmp = (math.sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0)
	else:
		tmp = 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)))
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 3.0)))) - b) / Float64(a * 3.0)) <= -0.15)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(3.0 * Float64(c * a)))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(1.0 / Float64(Float64(-2.0 * Float64(b / c)) + Float64(1.5 * Float64(a / b))));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (((sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0)) <= -0.15)
		tmp = (sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
	else
		tmp = 1.0 / ((-2.0 * (b / c)) + (1.5 * (a / b)));
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], -0.15], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3} \leq -0.15:\\
\;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}\\


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

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 50.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{3 \cdot \frac{a}{\log \color{blue}{\left(e^{\sqrt{c \cdot \left(\frac{{b}^{2}}{c} + -3 \cdot a\right)}} \cdot e^{-b}\right)}}} \]
      8. prod-exp47.2%

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

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

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

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

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

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

Alternative 17: 82.4% accurate, 8.9× speedup?

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

\\
\frac{1}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}
\end{array}
Derivation
  1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 64.8% accurate, 23.2× speedup?

\[\begin{array}{l} \\ \frac{-0.5}{\frac{b}{c}} \end{array} \]
(FPCore (a b c) :precision binary64 (/ -0.5 (/ b c)))
double code(double a, double b, double c) {
	return -0.5 / (b / c);
}
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) / (b / c)
end function
public static double code(double a, double b, double c) {
	return -0.5 / (b / c);
}
def code(a, b, c):
	return -0.5 / (b / c)
function code(a, b, c)
	return Float64(-0.5 / Float64(b / c))
end
function tmp = code(a, b, c)
	tmp = -0.5 / (b / c);
end
code[a_, b_, c_] := N[(-0.5 / N[(b / c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{-0.5}{\frac{b}{c}}
\end{array}
Derivation
  1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{b}{c} \cdot -2}} \]
  12. Simplified64.0%

    \[\leadsto \frac{1}{\color{blue}{\frac{b}{c} \cdot -2}} \]
  13. Step-by-step derivation
    1. inv-pow64.0%

      \[\leadsto \color{blue}{{\left(\frac{b}{c} \cdot -2\right)}^{-1}} \]
    2. *-commutative64.0%

      \[\leadsto {\color{blue}{\left(-2 \cdot \frac{b}{c}\right)}}^{-1} \]
    3. unpow-prod-down64.0%

      \[\leadsto \color{blue}{{-2}^{-1} \cdot {\left(\frac{b}{c}\right)}^{-1}} \]
    4. metadata-eval64.0%

      \[\leadsto \color{blue}{-0.5} \cdot {\left(\frac{b}{c}\right)}^{-1} \]
    5. inv-pow64.0%

      \[\leadsto -0.5 \cdot \color{blue}{\frac{1}{\frac{b}{c}}} \]
  14. Applied egg-rr64.0%

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

      \[\leadsto \color{blue}{\frac{-0.5 \cdot 1}{\frac{b}{c}}} \]
    2. metadata-eval64.0%

      \[\leadsto \frac{\color{blue}{-0.5}}{\frac{b}{c}} \]
  16. Simplified64.0%

    \[\leadsto \color{blue}{\frac{-0.5}{\frac{b}{c}}} \]
  17. Final simplification64.0%

    \[\leadsto \frac{-0.5}{\frac{b}{c}} \]
  18. Add Preprocessing

Alternative 19: 64.8% accurate, 23.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
  8. Final simplification64.1%

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

Reproduce

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