Cubic critical

Percentage Accurate: 52.1% → 81.3%
Time: 14.2s
Alternatives: 14
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 14 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: 52.1% 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: 81.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+110}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\

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

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


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

    1. Initial program 43.8%

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

        \[\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 95.6%

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

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

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

      if -3.4999999999999999e110 < b < 2.9500000000000002e81

      1. Initial program 74.3%

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

      if 2.9500000000000002e81 < b

      1. Initial program 13.0%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. Step-by-step derivation
        1. Simplified13.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 96.5%

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

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

      Alternative 2: 81.2% accurate, 0.9× speedup?

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

        1. Initial program 43.8%

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

            \[\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 95.6%

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

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

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

          if -3.5999999999999997e110 < b < 2.9500000000000002e81

          1. Initial program 74.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. sqr-neg74.3%

              \[\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-neg74.3%

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

              \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
          3. Simplified74.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 2.9500000000000002e81 < b

          1. Initial program 13.0%

            \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
          2. Step-by-step derivation
            1. Simplified13.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 96.5%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.6 \cdot 10^{+110}:\\ \;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\ \mathbf{elif}\;b \leq 2.95 \cdot 10^{+81}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 3: 80.6% accurate, 0.9× speedup?

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

            1. Initial program 68.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. Simplified68.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 84.2%

                \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
              4. Taylor expanded in c around 0 84.3%

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

              if -1.54999999999999997e-61 < b < 2.85e-29

              1. Initial program 71.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. Simplified70.9%

                  \[\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 67.1%

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

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

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

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

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

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

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

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

                if 2.85e-29 < b

                1. Initial program 24.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. Simplified24.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 82.1%

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

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

                Alternative 4: 80.6% accurate, 1.0× speedup?

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

                  1. Initial program 68.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. Simplified68.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 84.2%

                      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
                    4. Taylor expanded in c around 0 84.3%

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

                    if -2.2999999999999999e-58 < b < 2.85e-29

                    1. Initial program 71.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. Simplified70.9%

                        \[\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 67.1%

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

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

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

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

                      if 2.85e-29 < b

                      1. Initial program 24.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. Simplified24.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 82.1%

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

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

                      Alternative 5: 80.5% accurate, 1.0× speedup?

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

                        1. Initial program 68.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. Simplified68.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 84.2%

                            \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
                          4. Taylor expanded in c around 0 84.3%

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

                          if -6.39999999999999971e-56 < b < 1.2000000000000001e-28

                          1. Initial program 71.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. Simplified70.9%

                              \[\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 67.1%

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

                            if 1.2000000000000001e-28 < b

                            1. Initial program 24.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. Simplified24.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 82.1%

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

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

                            Alternative 6: 79.3% accurate, 1.0× speedup?

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

                              1. Initial program 68.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. Simplified68.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 84.2%

                                  \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
                                4. Taylor expanded in c around 0 84.3%

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

                                if -2.0999999999999999e-57 < b < 2.25e11

                                1. Initial program 69.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-cbrt64.2%

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

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

                                  \[\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-sqrt63.9%

                                    \[\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-in63.9%

                                    \[\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-eval63.9%

                                    \[\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-cbrt64.1%

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

                                  \[\leadsto \frac{\color{blue}{1 \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
                                8. Step-by-step derivation
                                  1. *-un-lft-identity64.1%

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

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

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

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

                                    \[\leadsto \frac{\color{blue}{0.3333333333333333}}{a} \cdot \sqrt{a \cdot \left(c \cdot -3\right)} \]
                                9. Applied egg-rr64.1%

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

                                if 2.25e11 < b

                                1. Initial program 20.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. Simplified20.3%

                                    \[\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.2%

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

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

                                Alternative 7: 72.0% accurate, 1.0× speedup?

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

                                  1. Initial program 69.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. Simplified69.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.0%

                                      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
                                    4. Taylor expanded in c around 0 82.2%

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

                                    if -6.39999999999999997e-89 < b < 1.02e-128

                                    1. Initial program 74.1%

                                      \[\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-cbrt70.4%

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

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

                                      \[\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-sqrt41.4%

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

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

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

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

                                    if 1.02e-128 < b

                                    1. Initial program 32.1%

                                      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                                    2. Step-by-step derivation
                                      1. Simplified32.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 72.9%

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

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

                                    Alternative 8: 68.3% accurate, 7.2× speedup?

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

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

                                          \[\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 61.9%

                                          \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
                                        4. Taylor expanded in c around 0 65.2%

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

                                        if -1.999999999999994e-310 < b

                                        1. Initial program 42.5%

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

                                            \[\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 56.2%

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

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

                                        Alternative 9: 68.2% accurate, 9.7× speedup?

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

                                          1. Initial program 71.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. Simplified71.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 62.7%

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

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

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

                                            if 4.99999999999999965e-273 < b

                                            1. Initial program 41.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. Simplified41.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 58.3%

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

                                            Alternative 10: 68.2% accurate, 11.6× speedup?

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

                                              1. Initial program 71.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. Simplified71.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 62.6%

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

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

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

                                                    \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
                                                7. Applied egg-rr62.6%

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

                                                if 4.99999999999999965e-273 < b

                                                1. Initial program 41.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. Simplified41.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 58.3%

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

                                                Alternative 11: 68.1% accurate, 11.6× speedup?

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

                                                  1. Initial program 71.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. Simplified71.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 62.6%

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

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

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

                                                    if 4.99999999999999965e-273 < b

                                                    1. Initial program 41.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. Simplified41.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 58.3%

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

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

                                                    Alternative 12: 68.2% accurate, 11.6× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 5 \cdot 10^{-273}:\\ \;\;\;\;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 5e-273) (* b (/ -0.6666666666666666 a)) (* -0.5 (/ c b))))
                                                    double code(double a, double b, double c) {
                                                    	double tmp;
                                                    	if (b <= 5e-273) {
                                                    		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 <= 5d-273) 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 <= 5e-273) {
                                                    		tmp = b * (-0.6666666666666666 / a);
                                                    	} else {
                                                    		tmp = -0.5 * (c / b);
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    def code(a, b, c):
                                                    	tmp = 0
                                                    	if b <= 5e-273:
                                                    		tmp = b * (-0.6666666666666666 / a)
                                                    	else:
                                                    		tmp = -0.5 * (c / b)
                                                    	return tmp
                                                    
                                                    function code(a, b, c)
                                                    	tmp = 0.0
                                                    	if (b <= 5e-273)
                                                    		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 <= 5e-273)
                                                    		tmp = b * (-0.6666666666666666 / a);
                                                    	else
                                                    		tmp = -0.5 * (c / b);
                                                    	end
                                                    	tmp_2 = tmp;
                                                    end
                                                    
                                                    code[a_, b_, c_] := If[LessEqual[b, 5e-273], 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 5 \cdot 10^{-273}:\\
                                                    \;\;\;\;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 < 4.99999999999999965e-273

                                                      1. Initial program 71.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. Simplified71.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 62.6%

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

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

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

                                                            \[\leadsto \color{blue}{\frac{1}{\frac{a}{b}}} \cdot -0.6666666666666666 \]
                                                          2. inv-pow62.6%

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

                                                          \[\leadsto \color{blue}{{\left(\frac{a}{b}\right)}^{-1}} \cdot -0.6666666666666666 \]
                                                        8. Step-by-step derivation
                                                          1. unpow-162.6%

                                                            \[\leadsto \color{blue}{\frac{1}{\frac{a}{b}}} \cdot -0.6666666666666666 \]
                                                        9. Simplified62.6%

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

                                                            \[\leadsto \color{blue}{\frac{1 \cdot -0.6666666666666666}{\frac{a}{b}}} \]
                                                          2. metadata-eval62.6%

                                                            \[\leadsto \frac{\color{blue}{-0.6666666666666666}}{\frac{a}{b}} \]
                                                        11. Applied egg-rr62.6%

                                                          \[\leadsto \color{blue}{\frac{-0.6666666666666666}{\frac{a}{b}}} \]
                                                        12. Step-by-step derivation
                                                          1. associate-/r/62.6%

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

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

                                                        if 4.99999999999999965e-273 < b

                                                        1. Initial program 41.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. Simplified41.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 58.3%

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

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

                                                        Alternative 13: 35.5% 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 56.6%

                                                          \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                                                        2. Step-by-step derivation
                                                          1. Simplified56.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 29.4%

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

                                                          Alternative 14: 11.4% accurate, 38.7× speedup?

                                                          \[\begin{array}{l} \\ \frac{0}{a} \end{array} \]
                                                          (FPCore (a b c) :precision binary64 (/ 0.0 a))
                                                          double code(double a, double b, double c) {
                                                          	return 0.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 = 0.0d0 / a
                                                          end function
                                                          
                                                          public static double code(double a, double b, double c) {
                                                          	return 0.0 / a;
                                                          }
                                                          
                                                          def code(a, b, c):
                                                          	return 0.0 / a
                                                          
                                                          function code(a, b, c)
                                                          	return Float64(0.0 / a)
                                                          end
                                                          
                                                          function tmp = code(a, b, c)
                                                          	tmp = 0.0 / a;
                                                          end
                                                          
                                                          code[a_, b_, c_] := N[(0.0 / a), $MachinePrecision]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \frac{0}{a}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Initial program 56.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-cbrt39.4%

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

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

                                                            \[\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. rem-cube-cbrt56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \frac{\color{blue}{0}}{a} \]
                                                          13. Simplified11.4%

                                                            \[\leadsto \color{blue}{\frac{0}{a}} \]
                                                          14. Add Preprocessing

                                                          Reproduce

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