Cubic critical

Percentage Accurate: 51.8% → 84.7%
Time: 16.8s
Alternatives: 13
Speedup: 11.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 51.8% 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: 84.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.4 \cdot 10^{+93}:\\
\;\;\;\;\frac{b \cdot -6}{a \cdot 9}\\

\mathbf{elif}\;b \leq 3.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{a}{\sqrt{b \cdot b + \frac{c}{\frac{-0.3333333333333333}{a}}} - b}}\\

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


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

    1. Initial program 59.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6459.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified59.2%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. div-subN/A

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

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

        \[\leadsto \frac{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3} - \frac{b}{3}}{a} \]
      7. frac-subN/A

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

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

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

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} \cdot 3 - 3 \cdot b}{\left(3 \cdot a\right) \cdot 3} \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} \cdot 3 - 3 \cdot b\right), \color{blue}{\left(\left(3 \cdot a\right) \cdot 3\right)}\right) \]
    6. Applied egg-rr59.2%

      \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} \cdot 3 + -3 \cdot b}{a \cdot 9}} \]
    7. Taylor expanded in b around -inf

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-6 \cdot b\right)}, \mathsf{*.f64}\left(a, 9\right)\right) \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(b \cdot -6\right), \mathsf{*.f64}\left(\color{blue}{a}, 9\right)\right) \]
      2. *-lowering-*.f6496.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -6\right), \mathsf{*.f64}\left(\color{blue}{a}, 9\right)\right) \]
    9. Simplified96.7%

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

    if -5.3999999999999999e93 < b < 3.49999999999999995e-6

    1. Initial program 80.5%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6480.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified80.5%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. div-subN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}\right), \color{blue}{3}\right) \]
    6. Applied egg-rr80.6%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right), \color{blue}{b}\right)\right)\right) \]
    8. Applied egg-rr80.6%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{\frac{a}{\sqrt{b \cdot b + \frac{c}{\frac{-0.3333333333333333}{a}}} - b}}} \]

    if 3.49999999999999995e-6 < b

    1. Initial program 9.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f649.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified9.0%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
      4. *-lowering-*.f6489.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
    7. Simplified89.7%

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

Alternative 2: 84.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.4 \cdot 10^{+147}:\\
\;\;\;\;\frac{b \cdot -6}{a \cdot 9}\\

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

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


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

    1. Initial program 46.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6446.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified46.6%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. div-subN/A

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

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

        \[\leadsto \frac{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3} - \frac{b}{3}}{a} \]
      7. frac-subN/A

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

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

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

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} \cdot 3 - 3 \cdot b}{\left(3 \cdot a\right) \cdot 3} \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} \cdot 3 - 3 \cdot b\right), \color{blue}{\left(\left(3 \cdot a\right) \cdot 3\right)}\right) \]
    6. Applied egg-rr46.6%

      \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} \cdot 3 + -3 \cdot b}{a \cdot 9}} \]
    7. Taylor expanded in b around -inf

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-6 \cdot b\right)}, \mathsf{*.f64}\left(a, 9\right)\right) \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(b \cdot -6\right), \mathsf{*.f64}\left(\color{blue}{a}, 9\right)\right) \]
      2. *-lowering-*.f6495.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -6\right), \mathsf{*.f64}\left(\color{blue}{a}, 9\right)\right) \]
    9. Simplified95.8%

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

    if -1.4e147 < b < 3.1999999999999999e-6

    1. Initial program 82.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6482.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified82.6%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. div-subN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{\_.f64}\left(\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right), \color{blue}{b}\right)\right) \]
    6. Applied egg-rr82.5%

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

    if 3.1999999999999999e-6 < b

    1. Initial program 9.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f649.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified9.0%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
      4. *-lowering-*.f6489.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
    7. Simplified89.7%

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

Alternative 3: 79.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.08 \cdot 10^{-47}:\\
\;\;\;\;\frac{\left(\frac{c \cdot -1.5}{b \cdot b} + \frac{2}{a}\right) \cdot \left(0 - b\right)}{3}\\

\mathbf{elif}\;b \leq 3.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{{\left(\frac{\frac{-0.3333333333333333}{a}}{c}\right)}^{-0.5} - b}{a \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.08000000000000005e-47

    1. Initial program 71.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6471.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified71.4%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. div-subN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}\right), \color{blue}{3}\right) \]
    6. Applied egg-rr71.4%

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}}{3}} \]
    7. Taylor expanded in b around -inf

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \left(b \cdot \left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right)\right)\right)}, 3\right) \]
    8. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(b \cdot \left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right)\right)\right), 3\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right) \cdot b\right)\right), 3\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right) \cdot \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{-3}{2} \cdot c}{{b}^{2}}\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-3}{2} \cdot c\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(c \cdot \frac{-3}{2}\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \left(b \cdot b\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      12. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(\frac{2 \cdot 1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(\frac{2}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \left(0 - b\right)\right), 3\right) \]
      16. --lowering--.f6492.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \mathsf{\_.f64}\left(0, b\right)\right), 3\right) \]
    9. Simplified92.5%

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

    if -1.08000000000000005e-47 < b < 3.1999999999999999e-6

    1. Initial program 75.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6475.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified75.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(a \cdot c\right) \cdot -3\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(a \cdot \left(c \cdot -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(a \cdot \left(-3 \cdot c\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(-3 \cdot c\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(c \cdot -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      6. *-lowering-*.f6466.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
    7. Simplified66.3%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left({\left(a \cdot \left(c \cdot -3\right)\right)}^{\frac{1}{2}}\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left({\left(\left(c \cdot -3\right) \cdot a\right)}^{\frac{1}{2}}\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left({\left(\left(c \cdot \frac{1}{\frac{-1}{3}}\right) \cdot a\right)}^{\frac{1}{2}}\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      4. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left({\left(\frac{c}{\frac{-1}{3}} \cdot a\right)}^{\frac{1}{2}}\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      5. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left({\left(\frac{c}{\frac{\frac{-1}{3}}{a}}\right)}^{\frac{1}{2}}\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left({\left(\frac{1}{\frac{\frac{\frac{-1}{3}}{a}}{c}}\right)}^{\frac{1}{2}}\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      7. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left({\left({\left(\frac{\frac{\frac{-1}{3}}{a}}{c}\right)}^{-1}\right)}^{\frac{1}{2}}\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      8. pow-powN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left({\left(\frac{\frac{\frac{-1}{3}}{a}}{c}\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{pow.f64}\left(\left(\frac{\frac{\frac{-1}{3}}{a}}{c}\right), \left(-1 \cdot \frac{1}{2}\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{-1}{3}}{a}\right), c\right), \left(-1 \cdot \frac{1}{2}\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{-1}{3}, a\right), c\right), \left(-1 \cdot \frac{1}{2}\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      12. metadata-eval69.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{-1}{3}, a\right), c\right), \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
    9. Applied egg-rr69.9%

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

    if 3.1999999999999999e-6 < b

    1. Initial program 9.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f649.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified9.0%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
      4. *-lowering-*.f6489.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
    7. Simplified89.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.08 \cdot 10^{-47}:\\ \;\;\;\;\frac{\left(\frac{c \cdot -1.5}{b \cdot b} + \frac{2}{a}\right) \cdot \left(0 - b\right)}{3}\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{{\left(\frac{\frac{-0.3333333333333333}{a}}{c}\right)}^{-0.5} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 79.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.06 \cdot 10^{-47}:\\
\;\;\;\;\frac{\left(\frac{c \cdot -1.5}{b \cdot b} + \frac{2}{a}\right) \cdot \left(0 - b\right)}{3}\\

\mathbf{elif}\;b \leq 3.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{a}{\sqrt{\frac{c}{\frac{-0.3333333333333333}{a}}} - b}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.05999999999999997e-47

    1. Initial program 71.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6471.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified71.4%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. div-subN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}\right), \color{blue}{3}\right) \]
    6. Applied egg-rr71.4%

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}}{3}} \]
    7. Taylor expanded in b around -inf

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \left(b \cdot \left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right)\right)\right)}, 3\right) \]
    8. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(b \cdot \left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right)\right)\right), 3\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right) \cdot b\right)\right), 3\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right) \cdot \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{-3}{2} \cdot c}{{b}^{2}}\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-3}{2} \cdot c\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(c \cdot \frac{-3}{2}\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \left(b \cdot b\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      12. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(\frac{2 \cdot 1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(\frac{2}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \left(0 - b\right)\right), 3\right) \]
      16. --lowering--.f6492.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \mathsf{\_.f64}\left(0, b\right)\right), 3\right) \]
    9. Simplified92.5%

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

    if -2.05999999999999997e-47 < b < 3.1999999999999999e-6

    1. Initial program 75.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6475.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified75.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(a \cdot c\right) \cdot -3\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(a \cdot \left(c \cdot -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(a \cdot \left(-3 \cdot c\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(-3 \cdot c\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(c \cdot -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      6. *-lowering-*.f6466.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
    7. Simplified66.3%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(c \cdot -3\right) \cdot a\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(c \cdot \frac{1}{\frac{-1}{3}}\right) \cdot a\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      3. div-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{c}{\frac{\frac{-1}{3}}{a}}\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{c}{\frac{1}{\frac{a}{\frac{-1}{3}}}}\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      6. associate-/r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{c}{\frac{1}{a}}}{\frac{-1}{3}}\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{c}{\frac{1}{a}}\right), \frac{-1}{3}\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c, \left(\frac{1}{a}\right)\right), \frac{-1}{3}\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      10. /-lowering-/.f6466.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c, \mathsf{/.f64}\left(1, a\right)\right), \frac{-1}{3}\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
    9. Applied egg-rr66.2%

      \[\leadsto \frac{\sqrt{\color{blue}{\frac{\frac{c}{\frac{1}{a}}}{-0.3333333333333333}}} - b}{3 \cdot a} \]
    10. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{3 \cdot a}{\sqrt{\frac{\frac{c}{\frac{1}{a}}}{\frac{-1}{3}}} - b}}} \]
      2. associate-/l*N/A

        \[\leadsto \frac{1}{3 \cdot \color{blue}{\frac{a}{\sqrt{\frac{\frac{c}{\frac{1}{a}}}{\frac{-1}{3}}} - b}}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{1}{3}}{\color{blue}{\frac{a}{\sqrt{\frac{\frac{c}{\frac{1}{a}}}{\frac{-1}{3}}} - b}}} \]
      4. metadata-evalN/A

        \[\leadsto \frac{\frac{1}{3}}{\frac{\color{blue}{a}}{\sqrt{\frac{\frac{c}{\frac{1}{a}}}{\frac{-1}{3}}} - b}} \]
      5. metadata-evalN/A

        \[\leadsto \frac{\mathsf{neg}\left(\frac{-1}{3}\right)}{\frac{\color{blue}{a}}{\sqrt{\frac{\frac{c}{\frac{1}{a}}}{\frac{-1}{3}}} - b}} \]
      6. /-lowering-/.f64N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\left(\sqrt{\frac{\frac{c}{\frac{1}{a}}}{\frac{-1}{3}}}\right), \color{blue}{b}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{c}{\frac{1}{a}}}{\frac{-1}{3}}\right)\right), b\right)\right)\right) \]
      11. associate-/l/N/A

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{c}{\frac{-1}{3} \cdot \frac{1}{a}}\right)\right), b\right)\right)\right) \]
      12. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(c, \left(\frac{\frac{-1}{3}}{a}\right)\right)\right), b\right)\right)\right) \]
      14. /-lowering-/.f6466.4%

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(c, \mathsf{/.f64}\left(\frac{-1}{3}, a\right)\right)\right), b\right)\right)\right) \]
    11. Applied egg-rr66.4%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{\frac{a}{\sqrt{\frac{c}{\frac{-0.3333333333333333}{a}}} - b}}} \]

    if 3.1999999999999999e-6 < b

    1. Initial program 9.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f649.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified9.0%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
      4. *-lowering-*.f6489.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
    7. Simplified89.7%

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

Alternative 5: 79.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{\left(\frac{c \cdot -1.5}{b \cdot b} + \frac{2}{a}\right) \cdot \left(0 - b\right)}{3}\\

\mathbf{elif}\;b \leq 3.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{a}{\sqrt{\frac{a}{\frac{-0.3333333333333333}{c}}} - b}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.19999999999999975e-48

    1. Initial program 71.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6471.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified71.4%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. div-subN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}\right), \color{blue}{3}\right) \]
    6. Applied egg-rr71.4%

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}}{3}} \]
    7. Taylor expanded in b around -inf

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \left(b \cdot \left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right)\right)\right)}, 3\right) \]
    8. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(b \cdot \left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right)\right)\right), 3\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right) \cdot b\right)\right), 3\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right) \cdot \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{-3}{2} \cdot c}{{b}^{2}}\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-3}{2} \cdot c\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(c \cdot \frac{-3}{2}\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \left(b \cdot b\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      12. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(\frac{2 \cdot 1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(\frac{2}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \left(0 - b\right)\right), 3\right) \]
      16. --lowering--.f6492.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \mathsf{\_.f64}\left(0, b\right)\right), 3\right) \]
    9. Simplified92.5%

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

    if -5.19999999999999975e-48 < b < 3.1999999999999999e-6

    1. Initial program 75.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6475.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified75.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(a \cdot c\right) \cdot -3\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(a \cdot \left(c \cdot -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(a \cdot \left(-3 \cdot c\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(-3 \cdot c\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(c \cdot -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      6. *-lowering-*.f6466.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
    7. Simplified66.3%

      \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}} - b}{3 \cdot a} \]
    8. Step-by-step derivation
      1. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\left(\sqrt{\left(c \cdot \frac{1}{\frac{-1}{3}}\right) \cdot a}\right), b\right)\right)\right) \]
      10. div-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\left(\sqrt{\frac{c}{\frac{\frac{-1}{3}}{a}}}\right), b\right)\right)\right) \]
      12. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{c}{\frac{\frac{-1}{3}}{a}}\right)\right), b\right)\right)\right) \]
      13. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{c}{\frac{-1}{3}} \cdot a\right)\right), b\right)\right)\right) \]
      14. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot a}{\frac{\frac{-1}{3}}{c}}\right)\right), b\right)\right)\right) \]
      16. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{a}{\frac{\frac{-1}{3}}{c}}\right)\right), b\right)\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{\frac{-1}{3}}{c}\right)\right)\right), b\right)\right)\right) \]
      18. /-lowering-/.f6466.3%

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\frac{-1}{3}, c\right)\right)\right), b\right)\right)\right) \]
    9. Applied egg-rr66.3%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{\frac{a}{\sqrt{\frac{a}{\frac{-0.3333333333333333}{c}}} - b}}} \]

    if 3.1999999999999999e-6 < b

    1. Initial program 9.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f649.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified9.0%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
      4. *-lowering-*.f6489.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
    7. Simplified89.7%

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

Alternative 6: 79.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.9 \cdot 10^{-48}:\\
\;\;\;\;\frac{\left(\frac{c \cdot -1.5}{b \cdot b} + \frac{2}{a}\right) \cdot \left(0 - b\right)}{3}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.9e-48

    1. Initial program 71.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6471.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified71.4%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. div-subN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}\right), \color{blue}{3}\right) \]
    6. Applied egg-rr71.4%

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}}{3}} \]
    7. Taylor expanded in b around -inf

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \left(b \cdot \left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right)\right)\right)}, 3\right) \]
    8. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(b \cdot \left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right)\right)\right), 3\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right) \cdot b\right)\right), 3\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right) \cdot \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-3}{2} \cdot \frac{c}{{b}^{2}} + 2 \cdot \frac{1}{a}\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{-3}{2} \cdot c}{{b}^{2}}\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-3}{2} \cdot c\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(c \cdot \frac{-3}{2}\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \left({b}^{2}\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \left(b \cdot b\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(2 \cdot \frac{1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      12. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(\frac{2 \cdot 1}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \left(\frac{2}{a}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), 3\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \left(0 - b\right)\right), 3\right) \]
      16. --lowering--.f6492.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-3}{2}\right), \mathsf{*.f64}\left(b, b\right)\right), \mathsf{/.f64}\left(2, a\right)\right), \mathsf{\_.f64}\left(0, b\right)\right), 3\right) \]
    9. Simplified92.5%

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

    if -3.9e-48 < b < 3.1999999999999999e-6

    1. Initial program 75.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6475.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified75.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(a \cdot c\right) \cdot -3\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(a \cdot \left(c \cdot -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(a \cdot \left(-3 \cdot c\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(-3 \cdot c\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(c \cdot -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
      6. *-lowering-*.f6466.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -3\right)\right)\right), b\right), \mathsf{*.f64}\left(3, a\right)\right) \]
    7. Simplified66.3%

      \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}} - b}{3 \cdot a} \]
    8. Step-by-step derivation
      1. clear-numN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(\frac{\frac{-1}{3}}{a}\right)\right), \color{blue}{\left(\sqrt{a \cdot \left(c \cdot -3\right)} - b\right)}\right) \]
      8. distribute-neg-fracN/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{\_.f64}\left(\left(\sqrt{\left(c \cdot -3\right) \cdot a}\right), b\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{\_.f64}\left(\left(\sqrt{\left(c \cdot \frac{1}{\frac{-1}{3}}\right) \cdot a}\right), b\right)\right) \]
      14. div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{\_.f64}\left(\left(\sqrt{\frac{c}{\frac{\frac{-1}{3}}{a}}}\right), b\right)\right) \]
      16. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{c}{\frac{\frac{-1}{3}}{a}}\right)\right), b\right)\right) \]
      17. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{c}{\frac{-1}{3}} \cdot a\right)\right), b\right)\right) \]
      18. clear-numN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot a}{\frac{\frac{-1}{3}}{c}}\right)\right), b\right)\right) \]
      20. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{a}{\frac{\frac{-1}{3}}{c}}\right)\right), b\right)\right) \]
      21. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{\frac{-1}{3}}{c}\right)\right)\right), b\right)\right) \]
      22. /-lowering-/.f6466.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\frac{-1}{3}, c\right)\right)\right), b\right)\right) \]
    9. Applied egg-rr66.3%

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

    if 3.1999999999999999e-6 < b

    1. Initial program 9.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f649.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified9.0%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
      4. *-lowering-*.f6489.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
    7. Simplified89.7%

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

Alternative 7: 67.7% accurate, 6.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{b \cdot -0.6666666666666666}{c} + 0.5 \cdot \frac{a}{b}}\\


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

    1. Initial program 77.8%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6477.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified77.8%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. div-subN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}\right), \color{blue}{3}\right) \]
    6. Applied egg-rr77.8%

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}}{3}} \]
    7. Taylor expanded in b around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \left(b \cdot \left(2 + \frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right)\right)\right)}, a\right), 3\right) \]
    8. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(b \cdot \left(2 + \frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right)\right)\right), a\right), 3\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(2 + \frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right) \cdot b\right)\right), a\right), 3\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(2 + \frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right) \cdot \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(2 + \frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{\frac{-3}{2} \cdot \left(a \cdot c\right)}{{b}^{2}}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{-3}{2} \cdot \left(a \cdot c\right)\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\left(\left(a \cdot c\right) \cdot \frac{-3}{2}\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\left(\left(c \cdot a\right) \cdot \frac{-3}{2}\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\left(c \cdot \left(a \cdot \frac{-3}{2}\right)\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \left(a \cdot \frac{-3}{2}\right)\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \frac{-3}{2}\right)\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \frac{-3}{2}\right)\right), \left(b \cdot b\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \frac{-3}{2}\right)\right), \mathsf{*.f64}\left(b, b\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \frac{-3}{2}\right)\right), \mathsf{*.f64}\left(b, b\right)\right)\right), \left(0 - b\right)\right), a\right), 3\right) \]
      16. --lowering--.f6463.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \frac{-3}{2}\right)\right), \mathsf{*.f64}\left(b, b\right)\right)\right), \mathsf{\_.f64}\left(0, b\right)\right), a\right), 3\right) \]
    9. Simplified63.1%

      \[\leadsto \frac{\frac{\color{blue}{\left(2 + \frac{c \cdot \left(a \cdot -1.5\right)}{b \cdot b}\right) \cdot \left(0 - b\right)}}{a}}{3} \]
    10. Taylor expanded in c around 0

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(b, a\right), \frac{-2}{3}\right), \mathsf{/.f64}\left(\left(c \cdot \frac{1}{2}\right), b\right)\right) \]
      8. *-lowering-*.f6467.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(b, a\right), \frac{-2}{3}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{1}{2}\right), b\right)\right) \]
    12. Simplified67.3%

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

    if -1.02000000000000005e-307 < b

    1. Initial program 26.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6426.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified26.0%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. div-subN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}\right), \color{blue}{3}\right) \]
    6. Applied egg-rr26.0%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(a, \mathsf{\_.f64}\left(\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right), \color{blue}{b}\right)\right)\right) \]
    8. Applied egg-rr26.1%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{\frac{a}{\sqrt{b \cdot b + \frac{c}{\frac{-0.3333333333333333}{a}}} - b}}} \]
    9. Taylor expanded in a around 0

      \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \color{blue}{\left(\frac{-2}{3} \cdot \frac{b}{c} + \frac{1}{2} \cdot \frac{a}{b}\right)}\right) \]
    10. Step-by-step derivation
      1. metadata-evalN/A

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

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \left(\frac{-2}{3} \cdot \frac{b}{c} + \left(\mathsf{neg}\left(\frac{-1}{2} \cdot \frac{a}{b}\right)\right)\right)\right) \]
      3. +-lowering-+.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \frac{-2}{3}\right), c\right), \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(\frac{a}{b}\right)}\right)\right)\right) \]
      11. /-lowering-/.f6465.5%

        \[\leadsto \mathsf{/.f64}\left(\frac{1}{3}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \frac{-2}{3}\right), c\right), \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    11. Simplified65.5%

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

Alternative 8: 67.9% accurate, 7.2× speedup?

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

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

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


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

    1. Initial program 77.8%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6477.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified77.8%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. div-subN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}\right), \color{blue}{3}\right) \]
    6. Applied egg-rr77.8%

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a}}{3}} \]
    7. Taylor expanded in b around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \left(b \cdot \left(2 + \frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right)\right)\right)}, a\right), 3\right) \]
    8. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(b \cdot \left(2 + \frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right)\right)\right), a\right), 3\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(2 + \frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right) \cdot b\right)\right), a\right), 3\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(2 + \frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right) \cdot \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(2 + \frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{-3}{2} \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{\frac{-3}{2} \cdot \left(a \cdot c\right)}{{b}^{2}}\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{-3}{2} \cdot \left(a \cdot c\right)\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\left(\left(a \cdot c\right) \cdot \frac{-3}{2}\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\left(\left(c \cdot a\right) \cdot \frac{-3}{2}\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\left(c \cdot \left(a \cdot \frac{-3}{2}\right)\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \left(a \cdot \frac{-3}{2}\right)\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \frac{-3}{2}\right)\right), \left({b}^{2}\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \frac{-3}{2}\right)\right), \left(b \cdot b\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \frac{-3}{2}\right)\right), \mathsf{*.f64}\left(b, b\right)\right)\right), \left(\mathsf{neg}\left(b\right)\right)\right), a\right), 3\right) \]
      15. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \frac{-3}{2}\right)\right), \mathsf{*.f64}\left(b, b\right)\right)\right), \left(0 - b\right)\right), a\right), 3\right) \]
      16. --lowering--.f6463.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \frac{-3}{2}\right)\right), \mathsf{*.f64}\left(b, b\right)\right)\right), \mathsf{\_.f64}\left(0, b\right)\right), a\right), 3\right) \]
    9. Simplified63.1%

      \[\leadsto \frac{\frac{\color{blue}{\left(2 + \frac{c \cdot \left(a \cdot -1.5\right)}{b \cdot b}\right) \cdot \left(0 - b\right)}}{a}}{3} \]
    10. Taylor expanded in c around 0

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(b, a\right), \frac{-2}{3}\right), \mathsf{/.f64}\left(\left(c \cdot \frac{1}{2}\right), b\right)\right) \]
      8. *-lowering-*.f6467.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(b, a\right), \frac{-2}{3}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{1}{2}\right), b\right)\right) \]
    12. Simplified67.3%

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

    if -4.999999999999985e-310 < b

    1. Initial program 26.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6426.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified26.0%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
      4. *-lowering-*.f6465.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
    7. Simplified65.4%

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

Alternative 9: 67.8% accurate, 11.6× speedup?

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

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

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


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

    1. Initial program 77.8%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6477.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified77.8%

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

      \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-2}{3} \cdot b}{\color{blue}{a}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(b \cdot \frac{-2}{3}\right), a\right) \]
      4. *-lowering-*.f6467.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \frac{-2}{3}\right), a\right) \]
    7. Simplified67.0%

      \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
    8. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \frac{b \cdot \frac{1}{\frac{-3}{2}}}{a} \]
      2. div-invN/A

        \[\leadsto \frac{\frac{b}{\frac{-3}{2}}}{a} \]
      3. associate-/r*N/A

        \[\leadsto \frac{b}{\color{blue}{\frac{-3}{2} \cdot a}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{b}{a \cdot \color{blue}{\frac{-3}{2}}} \]
      5. associate-/r*N/A

        \[\leadsto \frac{\frac{b}{a}}{\color{blue}{\frac{-3}{2}}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{b}{a}\right), \color{blue}{\frac{-3}{2}}\right) \]
      7. /-lowering-/.f6467.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(b, a\right), \frac{-3}{2}\right) \]
    9. Applied egg-rr67.1%

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

    if 1.999999999999994e-310 < b

    1. Initial program 26.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6426.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified26.0%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
      4. *-lowering-*.f6465.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
    7. Simplified65.4%

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

Alternative 10: 67.8% accurate, 11.6× speedup?

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

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

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


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

    1. Initial program 77.8%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6477.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified77.8%

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

      \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-2}{3} \cdot b}{\color{blue}{a}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(b \cdot \frac{-2}{3}\right), a\right) \]
      4. *-lowering-*.f6467.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \frac{-2}{3}\right), a\right) \]
    7. Simplified67.0%

      \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(b \cdot \frac{1}{\frac{-3}{2}}\right), a\right) \]
      3. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{b}{\frac{-3}{2}}\right), a\right) \]
      4. /-lowering-/.f6467.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(b, \frac{-3}{2}\right), a\right) \]
    9. Applied egg-rr67.1%

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

    if -4.999999999999985e-310 < b

    1. Initial program 26.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6426.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified26.0%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
      4. *-lowering-*.f6465.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
    7. Simplified65.4%

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

Alternative 11: 67.8% accurate, 11.6× speedup?

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

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

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


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

    1. Initial program 77.8%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6477.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified77.8%

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

      \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-2}{3} \cdot b}{\color{blue}{a}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(b \cdot \frac{-2}{3}\right), a\right) \]
      4. *-lowering-*.f6467.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \frac{-2}{3}\right), a\right) \]
    7. Simplified67.0%

      \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto b \cdot \color{blue}{\frac{\frac{-2}{3}}{a}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\frac{-2}{3}}{a} \cdot \color{blue}{b} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{-2}{3}}{a}\right), \color{blue}{b}\right) \]
      4. /-lowering-/.f6467.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-2}{3}, a\right), b\right) \]
    9. Applied egg-rr67.1%

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

    if -4.999999999999985e-310 < b

    1. Initial program 26.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6426.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified26.0%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
      4. *-lowering-*.f6465.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
    7. Simplified65.4%

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

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

Alternative 12: 42.9% accurate, 11.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 6 \cdot 10^{-47}:\\ \;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 6e-47) (* b (/ -0.6666666666666666 a)) 0.0))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 6e-47) {
		tmp = b * (-0.6666666666666666 / a);
	} else {
		tmp = 0.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) :: tmp
    if (b <= 6d-47) then
        tmp = b * ((-0.6666666666666666d0) / a)
    else
        tmp = 0.0d0
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 6e-47) {
		tmp = b * (-0.6666666666666666 / a);
	} else {
		tmp = 0.0;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 6e-47:
		tmp = b * (-0.6666666666666666 / a)
	else:
		tmp = 0.0
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 6e-47)
		tmp = Float64(b * Float64(-0.6666666666666666 / a));
	else
		tmp = 0.0;
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 6e-47)
		tmp = b * (-0.6666666666666666 / a);
	else
		tmp = 0.0;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 6e-47], N[(b * N[(-0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;0\\


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

    1. Initial program 74.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6474.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified74.0%

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

      \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{-2}{3} \cdot b}{\color{blue}{a}} \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(b \cdot \frac{-2}{3}\right), a\right) \]
      4. *-lowering-*.f6454.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \frac{-2}{3}\right), a\right) \]
    7. Simplified54.4%

      \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto b \cdot \color{blue}{\frac{\frac{-2}{3}}{a}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\frac{-2}{3}}{a} \cdot \color{blue}{b} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{-2}{3}}{a}\right), \color{blue}{b}\right) \]
      4. /-lowering-/.f6454.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-2}{3}, a\right), b\right) \]
    9. Applied egg-rr54.4%

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

    if 6.00000000000000033e-47 < b

    1. Initial program 13.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
      16. *-lowering-*.f6413.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
    3. Simplified13.0%

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
      2. sub-divN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
      4. sub-negN/A

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{3}{\frac{a}{b}} + -3 \cdot \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{a}}{-9}} \]
    7. Taylor expanded in c around 0

      \[\leadsto \color{blue}{\frac{-1}{9} \cdot \left(-3 \cdot \frac{b}{a} + 3 \cdot \frac{b}{a}\right)} \]
    8. Step-by-step derivation
      1. distribute-rgt-outN/A

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

        \[\leadsto \frac{-1}{9} \cdot \left(\frac{b}{a} \cdot 0\right) \]
      3. mul0-rgtN/A

        \[\leadsto \frac{-1}{9} \cdot 0 \]
      4. metadata-eval29.2%

        \[\leadsto 0 \]
    9. Simplified29.2%

      \[\leadsto \color{blue}{0} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.0%

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

Alternative 13: 10.7% accurate, 116.0× speedup?

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

\\
0
\end{array}
Derivation
  1. Initial program 53.5%

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

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

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6453.5%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified53.5%

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

      \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
    2. sub-divN/A

      \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
    3. remove-double-negN/A

      \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
    4. sub-negN/A

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{3}{\frac{a}{b}} + -3 \cdot \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{a}}{-9}} \]
  7. Taylor expanded in c around 0

    \[\leadsto \color{blue}{\frac{-1}{9} \cdot \left(-3 \cdot \frac{b}{a} + 3 \cdot \frac{b}{a}\right)} \]
  8. Step-by-step derivation
    1. distribute-rgt-outN/A

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

      \[\leadsto \frac{-1}{9} \cdot \left(\frac{b}{a} \cdot 0\right) \]
    3. mul0-rgtN/A

      \[\leadsto \frac{-1}{9} \cdot 0 \]
    4. metadata-eval11.7%

      \[\leadsto 0 \]
  9. Simplified11.7%

    \[\leadsto \color{blue}{0} \]
  10. Add Preprocessing

Reproduce

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