Cubic critical

Percentage Accurate: 51.0% → 85.2%
Time: 13.0s
Alternatives: 12
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 12 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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 85.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+100}:\\ \;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\ \mathbf{elif}\;b \leq 3.5 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -5.2e+100)
   (/ (* b -0.6666666666666666) a)
   (if (<= b 3.5e-29)
     (/ (- (sqrt (- (* b b) (* (* a 3.0) c))) b) (* a 3.0))
     (/ (* c -0.5) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -5.2e+100) {
		tmp = (b * -0.6666666666666666) / a;
	} else if (b <= 3.5e-29) {
		tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - 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 <= (-5.2d+100)) then
        tmp = (b * (-0.6666666666666666d0)) / a
    else if (b <= 3.5d-29) then
        tmp = (sqrt(((b * b) - ((a * 3.0d0) * c))) - 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 <= -5.2e+100) {
		tmp = (b * -0.6666666666666666) / a;
	} else if (b <= 3.5e-29) {
		tmp = (Math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -5.2e+100:
		tmp = (b * -0.6666666666666666) / a
	elif b <= 3.5e-29:
		tmp = (math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0)
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -5.2e+100)
		tmp = Float64(Float64(b * -0.6666666666666666) / a);
	elseif (b <= 3.5e-29)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(a * 3.0) * c))) - 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 <= -5.2e+100)
		tmp = (b * -0.6666666666666666) / a;
	elseif (b <= 3.5e-29)
		tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -5.2e+100], N[(N[(b * -0.6666666666666666), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 3.5e-29], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(a * 3.0), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $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 -5.2 \cdot 10^{+100}:\\
\;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\

\mathbf{elif}\;b \leq 3.5 \cdot 10^{-29}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - 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 < -5.2000000000000003e100

    1. Initial program 55.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt55.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
      2. *-commutative96.1%

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

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

    if -5.2000000000000003e100 < b < 3.4999999999999997e-29

    1. Initial program 83.4%

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

    if 3.4999999999999997e-29 < b

    1. Initial program 12.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. Simplified12.2%

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

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

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

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

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

    Alternative 2: 85.1% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+100}:\\ \;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{-28}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
    (FPCore (a b c)
     :precision binary64
     (if (<= b -5.2e+100)
       (/ (* b -0.6666666666666666) a)
       (if (<= b 1.95e-28)
         (/ (- (sqrt (- (* b b) (* 3.0 (* a c)))) b) (* a 3.0))
         (/ (* c -0.5) b))))
    double code(double a, double b, double c) {
    	double tmp;
    	if (b <= -5.2e+100) {
    		tmp = (b * -0.6666666666666666) / a;
    	} else if (b <= 1.95e-28) {
    		tmp = (sqrt(((b * b) - (3.0 * (a * c)))) - 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 <= (-5.2d+100)) then
            tmp = (b * (-0.6666666666666666d0)) / a
        else if (b <= 1.95d-28) then
            tmp = (sqrt(((b * b) - (3.0d0 * (a * c)))) - 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 <= -5.2e+100) {
    		tmp = (b * -0.6666666666666666) / a;
    	} else if (b <= 1.95e-28) {
    		tmp = (Math.sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0);
    	} else {
    		tmp = (c * -0.5) / b;
    	}
    	return tmp;
    }
    
    def code(a, b, c):
    	tmp = 0
    	if b <= -5.2e+100:
    		tmp = (b * -0.6666666666666666) / a
    	elif b <= 1.95e-28:
    		tmp = (math.sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0)
    	else:
    		tmp = (c * -0.5) / b
    	return tmp
    
    function code(a, b, c)
    	tmp = 0.0
    	if (b <= -5.2e+100)
    		tmp = Float64(Float64(b * -0.6666666666666666) / a);
    	elseif (b <= 1.95e-28)
    		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(3.0 * Float64(a * c)))) - 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 <= -5.2e+100)
    		tmp = (b * -0.6666666666666666) / a;
    	elseif (b <= 1.95e-28)
    		tmp = (sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0);
    	else
    		tmp = (c * -0.5) / b;
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, c_] := If[LessEqual[b, -5.2e+100], N[(N[(b * -0.6666666666666666), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b, 1.95e-28], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \leq -5.2 \cdot 10^{+100}:\\
    \;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\
    
    \mathbf{elif}\;b \leq 1.95 \cdot 10^{-28}:\\
    \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - 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 < -5.2000000000000003e100

      1. Initial program 55.9%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. add-cube-cbrt55.9%

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

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

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

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

          \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
        2. *-commutative96.1%

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

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

      if -5.2000000000000003e100 < b < 1.94999999999999999e-28

      1. Initial program 83.4%

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

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

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

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

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

      if 1.94999999999999999e-28 < b

      1. Initial program 12.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. Simplified12.2%

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

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

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

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

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

      Alternative 3: 80.5% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - 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.75e-62)
         (/ (/ b a) -1.5)
         (if (<= b 5.8e-29)
           (/ (- (sqrt (* c (* a -3.0))) b) (* a 3.0))
           (/ (* c -0.5) b))))
      double code(double a, double b, double c) {
      	double tmp;
      	if (b <= -1.75e-62) {
      		tmp = (b / a) / -1.5;
      	} else if (b <= 5.8e-29) {
      		tmp = (sqrt((c * (a * -3.0))) - 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.75d-62)) then
              tmp = (b / a) / (-1.5d0)
          else if (b <= 5.8d-29) then
              tmp = (sqrt((c * (a * (-3.0d0)))) - 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.75e-62) {
      		tmp = (b / a) / -1.5;
      	} else if (b <= 5.8e-29) {
      		tmp = (Math.sqrt((c * (a * -3.0))) - b) / (a * 3.0);
      	} else {
      		tmp = (c * -0.5) / b;
      	}
      	return tmp;
      }
      
      def code(a, b, c):
      	tmp = 0
      	if b <= -1.75e-62:
      		tmp = (b / a) / -1.5
      	elif b <= 5.8e-29:
      		tmp = (math.sqrt((c * (a * -3.0))) - b) / (a * 3.0)
      	else:
      		tmp = (c * -0.5) / b
      	return tmp
      
      function code(a, b, c)
      	tmp = 0.0
      	if (b <= -1.75e-62)
      		tmp = Float64(Float64(b / a) / -1.5);
      	elseif (b <= 5.8e-29)
      		tmp = Float64(Float64(sqrt(Float64(c * Float64(a * -3.0))) - 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.75e-62)
      		tmp = (b / a) / -1.5;
      	elseif (b <= 5.8e-29)
      		tmp = (sqrt((c * (a * -3.0))) - b) / (a * 3.0);
      	else
      		tmp = (c * -0.5) / b;
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, b_, c_] := If[LessEqual[b, -1.75e-62], N[(N[(b / a), $MachinePrecision] / -1.5), $MachinePrecision], If[LessEqual[b, 5.8e-29], N[(N[(N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $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.75 \cdot 10^{-62}:\\
      \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\
      
      \mathbf{elif}\;b \leq 5.8 \cdot 10^{-29}:\\
      \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - 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.7500000000000001e-62

        1. Initial program 72.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. Simplified72.1%

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

            \[\leadsto \frac{\color{blue}{-2 \cdot b}}{3 \cdot a} \]
          4. Step-by-step derivation
            1. *-commutative87.6%

              \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
          5. Simplified87.6%

            \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
          6. Step-by-step derivation
            1. add-cube-cbrt86.6%

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

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

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

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

              \[\leadsto {\left(\sqrt[3]{\color{blue}{-0.6666666666666666} \cdot \frac{b}{a}}\right)}^{3} \]
          7. Applied egg-rr86.6%

            \[\leadsto \color{blue}{{\left(\sqrt[3]{-0.6666666666666666 \cdot \frac{b}{a}}\right)}^{3}} \]
          8. Step-by-step derivation
            1. rem-cube-cbrt87.5%

              \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
            2. clear-num87.4%

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

              \[\leadsto \color{blue}{\frac{-0.6666666666666666}{\frac{a}{b}}} \]
            4. metadata-eval87.6%

              \[\leadsto \frac{\color{blue}{\frac{1}{-1.5}}}{\frac{a}{b}} \]
            5. associate-/r*87.5%

              \[\leadsto \color{blue}{\frac{1}{-1.5 \cdot \frac{a}{b}}} \]
            6. *-commutative87.5%

              \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} \cdot -1.5}} \]
            7. associate-/r*87.6%

              \[\leadsto \color{blue}{\frac{\frac{1}{\frac{a}{b}}}{-1.5}} \]
            8. clear-num87.6%

              \[\leadsto \frac{\color{blue}{\frac{b}{a}}}{-1.5} \]
          9. Applied egg-rr87.6%

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

          if -1.7500000000000001e-62 < b < 5.80000000000000048e-29

          1. Initial program 78.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. Simplified78.1%

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

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

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

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

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

            if 5.80000000000000048e-29 < b

            1. Initial program 12.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. Simplified12.2%

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 4: 80.4% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.15 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{\left(a \cdot c\right) \cdot -3} - 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.15e-62)
               (/ (/ b a) -1.5)
               (if (<= b 6.5e-29)
                 (/ (- (sqrt (* (* a c) -3.0)) b) (* a 3.0))
                 (/ (* c -0.5) b))))
            double code(double a, double b, double c) {
            	double tmp;
            	if (b <= -1.15e-62) {
            		tmp = (b / a) / -1.5;
            	} else if (b <= 6.5e-29) {
            		tmp = (sqrt(((a * c) * -3.0)) - 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.15d-62)) then
                    tmp = (b / a) / (-1.5d0)
                else if (b <= 6.5d-29) then
                    tmp = (sqrt(((a * c) * (-3.0d0))) - 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.15e-62) {
            		tmp = (b / a) / -1.5;
            	} else if (b <= 6.5e-29) {
            		tmp = (Math.sqrt(((a * c) * -3.0)) - b) / (a * 3.0);
            	} else {
            		tmp = (c * -0.5) / b;
            	}
            	return tmp;
            }
            
            def code(a, b, c):
            	tmp = 0
            	if b <= -1.15e-62:
            		tmp = (b / a) / -1.5
            	elif b <= 6.5e-29:
            		tmp = (math.sqrt(((a * c) * -3.0)) - b) / (a * 3.0)
            	else:
            		tmp = (c * -0.5) / b
            	return tmp
            
            function code(a, b, c)
            	tmp = 0.0
            	if (b <= -1.15e-62)
            		tmp = Float64(Float64(b / a) / -1.5);
            	elseif (b <= 6.5e-29)
            		tmp = Float64(Float64(sqrt(Float64(Float64(a * c) * -3.0)) - 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.15e-62)
            		tmp = (b / a) / -1.5;
            	elseif (b <= 6.5e-29)
            		tmp = (sqrt(((a * c) * -3.0)) - b) / (a * 3.0);
            	else
            		tmp = (c * -0.5) / b;
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, b_, c_] := If[LessEqual[b, -1.15e-62], N[(N[(b / a), $MachinePrecision] / -1.5), $MachinePrecision], If[LessEqual[b, 6.5e-29], N[(N[(N[Sqrt[N[(N[(a * c), $MachinePrecision] * -3.0), $MachinePrecision]], $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.15 \cdot 10^{-62}:\\
            \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\
            
            \mathbf{elif}\;b \leq 6.5 \cdot 10^{-29}:\\
            \;\;\;\;\frac{\sqrt{\left(a \cdot c\right) \cdot -3} - 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.15e-62

              1. Initial program 72.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. Simplified72.1%

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

                  \[\leadsto \frac{\color{blue}{-2 \cdot b}}{3 \cdot a} \]
                4. Step-by-step derivation
                  1. *-commutative87.6%

                    \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
                5. Simplified87.6%

                  \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
                6. Step-by-step derivation
                  1. add-cube-cbrt86.6%

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

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

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

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

                    \[\leadsto {\left(\sqrt[3]{\color{blue}{-0.6666666666666666} \cdot \frac{b}{a}}\right)}^{3} \]
                7. Applied egg-rr86.6%

                  \[\leadsto \color{blue}{{\left(\sqrt[3]{-0.6666666666666666 \cdot \frac{b}{a}}\right)}^{3}} \]
                8. Step-by-step derivation
                  1. rem-cube-cbrt87.5%

                    \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
                  2. clear-num87.4%

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

                    \[\leadsto \color{blue}{\frac{-0.6666666666666666}{\frac{a}{b}}} \]
                  4. metadata-eval87.6%

                    \[\leadsto \frac{\color{blue}{\frac{1}{-1.5}}}{\frac{a}{b}} \]
                  5. associate-/r*87.5%

                    \[\leadsto \color{blue}{\frac{1}{-1.5 \cdot \frac{a}{b}}} \]
                  6. *-commutative87.5%

                    \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} \cdot -1.5}} \]
                  7. associate-/r*87.6%

                    \[\leadsto \color{blue}{\frac{\frac{1}{\frac{a}{b}}}{-1.5}} \]
                  8. clear-num87.6%

                    \[\leadsto \frac{\color{blue}{\frac{b}{a}}}{-1.5} \]
                9. Applied egg-rr87.6%

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

                if -1.15e-62 < b < 6.5e-29

                1. Initial program 78.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. Simplified78.1%

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

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

                  if 6.5e-29 < b

                  1. Initial program 12.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. Simplified12.2%

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

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.15 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{\left(a \cdot c\right) \cdot -3} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 5: 80.1% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)}}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
                  (FPCore (a b c)
                   :precision binary64
                   (if (<= b -1.65e-62)
                     (/ (/ b a) -1.5)
                     (if (<= b 1.2e-29) (/ (sqrt (* a (* c -3.0))) (* a 3.0)) (/ (* c -0.5) b))))
                  double code(double a, double b, double c) {
                  	double tmp;
                  	if (b <= -1.65e-62) {
                  		tmp = (b / a) / -1.5;
                  	} else if (b <= 1.2e-29) {
                  		tmp = sqrt((a * (c * -3.0))) / (a * 3.0);
                  	} else {
                  		tmp = (c * -0.5) / b;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(a, b, c)
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8), intent (in) :: c
                      real(8) :: tmp
                      if (b <= (-1.65d-62)) then
                          tmp = (b / a) / (-1.5d0)
                      else if (b <= 1.2d-29) then
                          tmp = sqrt((a * (c * (-3.0d0)))) / (a * 3.0d0)
                      else
                          tmp = (c * (-0.5d0)) / b
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double a, double b, double c) {
                  	double tmp;
                  	if (b <= -1.65e-62) {
                  		tmp = (b / a) / -1.5;
                  	} else if (b <= 1.2e-29) {
                  		tmp = Math.sqrt((a * (c * -3.0))) / (a * 3.0);
                  	} else {
                  		tmp = (c * -0.5) / b;
                  	}
                  	return tmp;
                  }
                  
                  def code(a, b, c):
                  	tmp = 0
                  	if b <= -1.65e-62:
                  		tmp = (b / a) / -1.5
                  	elif b <= 1.2e-29:
                  		tmp = math.sqrt((a * (c * -3.0))) / (a * 3.0)
                  	else:
                  		tmp = (c * -0.5) / b
                  	return tmp
                  
                  function code(a, b, c)
                  	tmp = 0.0
                  	if (b <= -1.65e-62)
                  		tmp = Float64(Float64(b / a) / -1.5);
                  	elseif (b <= 1.2e-29)
                  		tmp = Float64(sqrt(Float64(a * Float64(c * -3.0))) / 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.65e-62)
                  		tmp = (b / a) / -1.5;
                  	elseif (b <= 1.2e-29)
                  		tmp = sqrt((a * (c * -3.0))) / (a * 3.0);
                  	else
                  		tmp = (c * -0.5) / b;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[a_, b_, c_] := If[LessEqual[b, -1.65e-62], N[(N[(b / a), $MachinePrecision] / -1.5), $MachinePrecision], If[LessEqual[b, 1.2e-29], N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $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.65 \cdot 10^{-62}:\\
                  \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\
                  
                  \mathbf{elif}\;b \leq 1.2 \cdot 10^{-29}:\\
                  \;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)}}{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.65000000000000002e-62

                    1. Initial program 72.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. Simplified72.1%

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

                        \[\leadsto \frac{\color{blue}{-2 \cdot b}}{3 \cdot a} \]
                      4. Step-by-step derivation
                        1. *-commutative87.6%

                          \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
                      5. Simplified87.6%

                        \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
                      6. Step-by-step derivation
                        1. add-cube-cbrt86.6%

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

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

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

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

                          \[\leadsto {\left(\sqrt[3]{\color{blue}{-0.6666666666666666} \cdot \frac{b}{a}}\right)}^{3} \]
                      7. Applied egg-rr86.6%

                        \[\leadsto \color{blue}{{\left(\sqrt[3]{-0.6666666666666666 \cdot \frac{b}{a}}\right)}^{3}} \]
                      8. Step-by-step derivation
                        1. rem-cube-cbrt87.5%

                          \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
                        2. clear-num87.4%

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

                          \[\leadsto \color{blue}{\frac{-0.6666666666666666}{\frac{a}{b}}} \]
                        4. metadata-eval87.6%

                          \[\leadsto \frac{\color{blue}{\frac{1}{-1.5}}}{\frac{a}{b}} \]
                        5. associate-/r*87.5%

                          \[\leadsto \color{blue}{\frac{1}{-1.5 \cdot \frac{a}{b}}} \]
                        6. *-commutative87.5%

                          \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} \cdot -1.5}} \]
                        7. associate-/r*87.6%

                          \[\leadsto \color{blue}{\frac{\frac{1}{\frac{a}{b}}}{-1.5}} \]
                        8. clear-num87.6%

                          \[\leadsto \frac{\color{blue}{\frac{b}{a}}}{-1.5} \]
                      9. Applied egg-rr87.6%

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

                      if -1.65000000000000002e-62 < b < 1.19999999999999996e-29

                      1. Initial program 78.4%

                        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. add-cube-cbrt77.7%

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

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

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

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

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

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

                          \[\leadsto \frac{-\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot \sqrt{a \cdot \left(c \cdot {\left(\sqrt[3]{-3}\right)}^{3}\right)}}{3 \cdot a} \]
                        4. rem-square-sqrt71.6%

                          \[\leadsto \frac{-\color{blue}{-1} \cdot \sqrt{a \cdot \left(c \cdot {\left(\sqrt[3]{-3}\right)}^{3}\right)}}{3 \cdot a} \]
                        5. distribute-lft-neg-in71.6%

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

                          \[\leadsto \frac{\color{blue}{1} \cdot \sqrt{a \cdot \left(c \cdot {\left(\sqrt[3]{-3}\right)}^{3}\right)}}{3 \cdot a} \]
                        7. rem-cube-cbrt71.8%

                          \[\leadsto \frac{1 \cdot \sqrt{a \cdot \left(c \cdot \color{blue}{-3}\right)}}{3 \cdot a} \]
                      7. Simplified71.8%

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

                      if 1.19999999999999996e-29 < b

                      1. Initial program 12.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. Simplified12.2%

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

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

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)}}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
                      5. Add Preprocessing

                      Alternative 6: 72.0% accurate, 1.0× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.7 \cdot 10^{-99}:\\ \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\ \mathbf{elif}\;b \leq 8.6 \cdot 10^{-68}:\\ \;\;\;\;\sqrt{c \cdot \frac{-3}{a}} \cdot \left(--0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
                      (FPCore (a b c)
                       :precision binary64
                       (if (<= b -1.7e-99)
                         (/ (/ b a) -1.5)
                         (if (<= b 8.6e-68)
                           (* (sqrt (* c (/ -3.0 a))) (- -0.3333333333333333))
                           (/ (* c -0.5) b))))
                      double code(double a, double b, double c) {
                      	double tmp;
                      	if (b <= -1.7e-99) {
                      		tmp = (b / a) / -1.5;
                      	} else if (b <= 8.6e-68) {
                      		tmp = sqrt((c * (-3.0 / a))) * -(-0.3333333333333333);
                      	} 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.7d-99)) then
                              tmp = (b / a) / (-1.5d0)
                          else if (b <= 8.6d-68) then
                              tmp = sqrt((c * ((-3.0d0) / a))) * -(-0.3333333333333333d0)
                          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.7e-99) {
                      		tmp = (b / a) / -1.5;
                      	} else if (b <= 8.6e-68) {
                      		tmp = Math.sqrt((c * (-3.0 / a))) * -(-0.3333333333333333);
                      	} else {
                      		tmp = (c * -0.5) / b;
                      	}
                      	return tmp;
                      }
                      
                      def code(a, b, c):
                      	tmp = 0
                      	if b <= -1.7e-99:
                      		tmp = (b / a) / -1.5
                      	elif b <= 8.6e-68:
                      		tmp = math.sqrt((c * (-3.0 / a))) * -(-0.3333333333333333)
                      	else:
                      		tmp = (c * -0.5) / b
                      	return tmp
                      
                      function code(a, b, c)
                      	tmp = 0.0
                      	if (b <= -1.7e-99)
                      		tmp = Float64(Float64(b / a) / -1.5);
                      	elseif (b <= 8.6e-68)
                      		tmp = Float64(sqrt(Float64(c * Float64(-3.0 / a))) * Float64(-(-0.3333333333333333)));
                      	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.7e-99)
                      		tmp = (b / a) / -1.5;
                      	elseif (b <= 8.6e-68)
                      		tmp = sqrt((c * (-3.0 / a))) * -(-0.3333333333333333);
                      	else
                      		tmp = (c * -0.5) / b;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[a_, b_, c_] := If[LessEqual[b, -1.7e-99], N[(N[(b / a), $MachinePrecision] / -1.5), $MachinePrecision], If[LessEqual[b, 8.6e-68], N[(N[Sqrt[N[(c * N[(-3.0 / a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (--0.3333333333333333)), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;b \leq -1.7 \cdot 10^{-99}:\\
                      \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\
                      
                      \mathbf{elif}\;b \leq 8.6 \cdot 10^{-68}:\\
                      \;\;\;\;\sqrt{c \cdot \frac{-3}{a}} \cdot \left(--0.3333333333333333\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{c \cdot -0.5}{b}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if b < -1.70000000000000003e-99

                        1. Initial program 74.7%

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

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

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

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

                            \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
                          6. Step-by-step derivation
                            1. add-cube-cbrt81.8%

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

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

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

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

                              \[\leadsto {\left(\sqrt[3]{\color{blue}{-0.6666666666666666} \cdot \frac{b}{a}}\right)}^{3} \]
                          7. Applied egg-rr81.8%

                            \[\leadsto \color{blue}{{\left(\sqrt[3]{-0.6666666666666666 \cdot \frac{b}{a}}\right)}^{3}} \]
                          8. Step-by-step derivation
                            1. rem-cube-cbrt82.6%

                              \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
                            2. clear-num82.6%

                              \[\leadsto -0.6666666666666666 \cdot \color{blue}{\frac{1}{\frac{a}{b}}} \]
                            3. div-inv82.7%

                              \[\leadsto \color{blue}{\frac{-0.6666666666666666}{\frac{a}{b}}} \]
                            4. metadata-eval82.7%

                              \[\leadsto \frac{\color{blue}{\frac{1}{-1.5}}}{\frac{a}{b}} \]
                            5. associate-/r*82.6%

                              \[\leadsto \color{blue}{\frac{1}{-1.5 \cdot \frac{a}{b}}} \]
                            6. *-commutative82.6%

                              \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} \cdot -1.5}} \]
                            7. associate-/r*82.8%

                              \[\leadsto \color{blue}{\frac{\frac{1}{\frac{a}{b}}}{-1.5}} \]
                            8. clear-num82.8%

                              \[\leadsto \frac{\color{blue}{\frac{b}{a}}}{-1.5} \]
                          9. Applied egg-rr82.8%

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

                          if -1.70000000000000003e-99 < b < 8.6000000000000002e-68

                          1. Initial program 76.6%

                            \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. add-cube-cbrt76.0%

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

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

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

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

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

                              \[\leadsto -0.3333333333333333 \cdot \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot \sqrt{\frac{c \cdot {\left(\sqrt[3]{-3}\right)}^{3}}{a}}\right) \]
                            3. rem-square-sqrt40.5%

                              \[\leadsto -0.3333333333333333 \cdot \left(\color{blue}{-1} \cdot \sqrt{\frac{c \cdot {\left(\sqrt[3]{-3}\right)}^{3}}{a}}\right) \]
                            4. rem-cube-cbrt40.7%

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

                              \[\leadsto -0.3333333333333333 \cdot \left(-1 \cdot \sqrt{\color{blue}{c \cdot \frac{-3}{a}}}\right) \]
                          7. Simplified40.8%

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

                          if 8.6000000000000002e-68 < b

                          1. Initial program 16.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. Simplified16.0%

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

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

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

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.7 \cdot 10^{-99}:\\ \;\;\;\;\frac{\frac{b}{a}}{-1.5}\\ \mathbf{elif}\;b \leq 8.6 \cdot 10^{-68}:\\ \;\;\;\;\sqrt{c \cdot \frac{-3}{a}} \cdot \left(--0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
                          5. Add Preprocessing

                          Alternative 7: 69.0% accurate, 11.6× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 4.4 \cdot 10^{-307}:\\ \;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
                          (FPCore (a b c)
                           :precision binary64
                           (if (<= b 4.4e-307) (/ (* b -0.6666666666666666) a) (/ (* c -0.5) b)))
                          double code(double a, double b, double c) {
                          	double tmp;
                          	if (b <= 4.4e-307) {
                          		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 <= 4.4d-307) 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 <= 4.4e-307) {
                          		tmp = (b * -0.6666666666666666) / a;
                          	} else {
                          		tmp = (c * -0.5) / b;
                          	}
                          	return tmp;
                          }
                          
                          def code(a, b, c):
                          	tmp = 0
                          	if b <= 4.4e-307:
                          		tmp = (b * -0.6666666666666666) / a
                          	else:
                          		tmp = (c * -0.5) / b
                          	return tmp
                          
                          function code(a, b, c)
                          	tmp = 0.0
                          	if (b <= 4.4e-307)
                          		tmp = Float64(Float64(b * -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 <= 4.4e-307)
                          		tmp = (b * -0.6666666666666666) / a;
                          	else
                          		tmp = (c * -0.5) / b;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[a_, b_, c_] := If[LessEqual[b, 4.4e-307], N[(N[(b * -0.6666666666666666), $MachinePrecision] / a), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;b \leq 4.4 \cdot 10^{-307}:\\
                          \;\;\;\;\frac{b \cdot -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.4e-307

                            1. Initial program 77.2%

                              \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. add-cube-cbrt76.9%

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

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

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

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

                                \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
                              2. *-commutative64.7%

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

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

                            if 4.4e-307 < b

                            1. Initial program 32.7%

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

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

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

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

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

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

                            Alternative 8: 68.9% accurate, 11.6× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 1.32 \cdot 10^{-306}:\\ \;\;\;\;\frac{-0.6666666666666666}{\frac{a}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
                            (FPCore (a b c)
                             :precision binary64
                             (if (<= b 1.32e-306) (/ -0.6666666666666666 (/ a b)) (/ (* c -0.5) b)))
                            double code(double a, double b, double c) {
                            	double tmp;
                            	if (b <= 1.32e-306) {
                            		tmp = -0.6666666666666666 / (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 <= 1.32d-306) then
                                    tmp = (-0.6666666666666666d0) / (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 <= 1.32e-306) {
                            		tmp = -0.6666666666666666 / (a / b);
                            	} else {
                            		tmp = (c * -0.5) / b;
                            	}
                            	return tmp;
                            }
                            
                            def code(a, b, c):
                            	tmp = 0
                            	if b <= 1.32e-306:
                            		tmp = -0.6666666666666666 / (a / b)
                            	else:
                            		tmp = (c * -0.5) / b
                            	return tmp
                            
                            function code(a, b, c)
                            	tmp = 0.0
                            	if (b <= 1.32e-306)
                            		tmp = Float64(-0.6666666666666666 / Float64(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 <= 1.32e-306)
                            		tmp = -0.6666666666666666 / (a / b);
                            	else
                            		tmp = (c * -0.5) / b;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[a_, b_, c_] := If[LessEqual[b, 1.32e-306], N[(-0.6666666666666666 / N[(a / b), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;b \leq 1.32 \cdot 10^{-306}:\\
                            \;\;\;\;\frac{-0.6666666666666666}{\frac{a}{b}}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{c \cdot -0.5}{b}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if b < 1.32e-306

                              1. Initial program 77.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. Simplified77.1%

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

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

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

                                  \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
                                6. Step-by-step derivation
                                  1. add-cube-cbrt64.0%

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

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

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

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

                                    \[\leadsto {\left(\sqrt[3]{\color{blue}{-0.6666666666666666} \cdot \frac{b}{a}}\right)}^{3} \]
                                7. Applied egg-rr64.0%

                                  \[\leadsto \color{blue}{{\left(\sqrt[3]{-0.6666666666666666 \cdot \frac{b}{a}}\right)}^{3}} \]
                                8. Step-by-step derivation
                                  1. rem-cube-cbrt64.6%

                                    \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
                                  2. clear-num64.6%

                                    \[\leadsto -0.6666666666666666 \cdot \color{blue}{\frac{1}{\frac{a}{b}}} \]
                                  3. div-inv64.7%

                                    \[\leadsto \color{blue}{\frac{-0.6666666666666666}{\frac{a}{b}}} \]
                                9. Applied egg-rr64.7%

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

                                if 1.32e-306 < b

                                1. Initial program 32.7%

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

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

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

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

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

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

                                Alternative 9: 68.9% accurate, 11.6× speedup?

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

                                  1. Initial program 77.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. Simplified77.1%

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

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

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

                                      \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
                                    6. Step-by-step derivation
                                      1. add-cube-cbrt64.0%

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

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

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

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

                                        \[\leadsto {\left(\sqrt[3]{\color{blue}{-0.6666666666666666} \cdot \frac{b}{a}}\right)}^{3} \]
                                    7. Applied egg-rr64.0%

                                      \[\leadsto \color{blue}{{\left(\sqrt[3]{-0.6666666666666666 \cdot \frac{b}{a}}\right)}^{3}} \]
                                    8. Step-by-step derivation
                                      1. rem-cube-cbrt64.6%

                                        \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
                                      2. clear-num64.6%

                                        \[\leadsto -0.6666666666666666 \cdot \color{blue}{\frac{1}{\frac{a}{b}}} \]
                                      3. div-inv64.7%

                                        \[\leadsto \color{blue}{\frac{-0.6666666666666666}{\frac{a}{b}}} \]
                                    9. Applied egg-rr64.7%

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

                                    if 4.3000000000000002e-308 < b

                                    1. Initial program 32.7%

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

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

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

                                    Alternative 10: 68.9% accurate, 11.6× speedup?

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

                                      1. Initial program 77.2%

                                        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                                      2. Add Preprocessing
                                      3. Step-by-step derivation
                                        1. add-cube-cbrt76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{0.3333333333333333}{a} \cdot \mathsf{fma}\left(-1, b, \sqrt{\color{blue}{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}\right) \]
                                        13. *-commutative77.0%

                                          \[\leadsto \frac{0.3333333333333333}{a} \cdot \mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot -3}\right)}\right) \]
                                        14. associate-*r*77.0%

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

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

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

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

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

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

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

                                      if -1.999999999999994e-310 < b

                                      1. Initial program 32.7%

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

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

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

                                      Alternative 11: 36.2% accurate, 23.2× speedup?

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

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

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

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

                                        Alternative 12: 11.5% 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 55.3%

                                          \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                                        2. Add Preprocessing
                                        3. Step-by-step derivation
                                          1. add-cube-cbrt55.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \frac{0.3333333333333333}{a} \cdot \mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot -3}\right)}\right) \]
                                          14. associate-*r*55.2%

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

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

                                          \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{b + -1 \cdot b}{a}} \]
                                        10. Step-by-step derivation
                                          1. associate-*r/10.5%

                                            \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \left(b + -1 \cdot b\right)}{a}} \]
                                          2. distribute-rgt1-in10.5%

                                            \[\leadsto \frac{0.3333333333333333 \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot b\right)}}{a} \]
                                          3. metadata-eval10.5%

                                            \[\leadsto \frac{0.3333333333333333 \cdot \left(\color{blue}{0} \cdot b\right)}{a} \]
                                          4. mul0-lft10.5%

                                            \[\leadsto \frac{0.3333333333333333 \cdot \color{blue}{0}}{a} \]
                                          5. metadata-eval10.5%

                                            \[\leadsto \frac{\color{blue}{0}}{a} \]
                                        11. Simplified10.5%

                                          \[\leadsto \color{blue}{\frac{0}{a}} \]
                                        12. Taylor expanded in a around 0 10.5%

                                          \[\leadsto \color{blue}{0} \]
                                        13. Add Preprocessing

                                        Reproduce

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