Cubic critical

Percentage Accurate: 52.0% → 85.4%
Time: 10.5s
Alternatives: 10
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 10 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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 85.4% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 39.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. Simplified39.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 95.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 96.0%

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

      if -5.6000000000000002e125 < b < 7.5e-73

      1. Initial program 84.4%

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

      if 7.5e-73 < b

      1. Initial program 15.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. Simplified15.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 85.9%

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

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

      Alternative 2: 85.4% accurate, 0.9× speedup?

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

        1. Initial program 39.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. Simplified39.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 95.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 96.0%

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

          if -2.2999999999999999e123 < b < 7.99999999999999998e-73

          1. Initial program 84.4%

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

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

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

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

          1. Initial program 15.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. Simplified15.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 85.9%

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

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

          Alternative 3: 80.3% accurate, 1.0× speedup?

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

            1. Initial program 62.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. Simplified62.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 -inf 86.1%

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

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

              if -2.3500000000000001e-36 < b < 5.60000000000000023e-73

              1. Initial program 80.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. Simplified80.1%

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

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

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

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

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

                if 5.60000000000000023e-73 < b

                1. Initial program 15.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. Simplified15.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 85.9%

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

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

                Alternative 4: 80.3% accurate, 1.0× speedup?

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

                  1. Initial program 62.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. Simplified62.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 -inf 86.1%

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

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

                    if -9e-41 < b < 9.50000000000000005e-73

                    1. Initial program 80.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. Simplified80.1%

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

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

                      if 9.50000000000000005e-73 < b

                      1. Initial program 15.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. Simplified15.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 85.9%

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

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

                      Alternative 5: 79.8% accurate, 1.0× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.2 \cdot 10^{-42}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 4.7 \cdot 10^{-32}:\\ \;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)}}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                      (FPCore (a b c)
                       :precision binary64
                       (if (<= b -4.2e-42)
                         (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
                         (if (<= b 4.7e-32) (/ (sqrt (* a (* c -3.0))) (* a 3.0)) (* (/ c b) -0.5))))
                      double code(double a, double b, double c) {
                      	double tmp;
                      	if (b <= -4.2e-42) {
                      		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
                      	} else if (b <= 4.7e-32) {
                      		tmp = sqrt((a * (c * -3.0))) / (a * 3.0);
                      	} else {
                      		tmp = (c / b) * -0.5;
                      	}
                      	return tmp;
                      }
                      
                      real(8) function code(a, b, c)
                          real(8), intent (in) :: a
                          real(8), intent (in) :: b
                          real(8), intent (in) :: c
                          real(8) :: tmp
                          if (b <= (-4.2d-42)) then
                              tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
                          else if (b <= 4.7d-32) then
                              tmp = sqrt((a * (c * (-3.0d0)))) / (a * 3.0d0)
                          else
                              tmp = (c / b) * (-0.5d0)
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double a, double b, double c) {
                      	double tmp;
                      	if (b <= -4.2e-42) {
                      		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
                      	} else if (b <= 4.7e-32) {
                      		tmp = Math.sqrt((a * (c * -3.0))) / (a * 3.0);
                      	} else {
                      		tmp = (c / b) * -0.5;
                      	}
                      	return tmp;
                      }
                      
                      def code(a, b, c):
                      	tmp = 0
                      	if b <= -4.2e-42:
                      		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
                      	elif b <= 4.7e-32:
                      		tmp = math.sqrt((a * (c * -3.0))) / (a * 3.0)
                      	else:
                      		tmp = (c / b) * -0.5
                      	return tmp
                      
                      function code(a, b, c)
                      	tmp = 0.0
                      	if (b <= -4.2e-42)
                      		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
                      	elseif (b <= 4.7e-32)
                      		tmp = Float64(sqrt(Float64(a * Float64(c * -3.0))) / Float64(a * 3.0));
                      	else
                      		tmp = Float64(Float64(c / b) * -0.5);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(a, b, c)
                      	tmp = 0.0;
                      	if (b <= -4.2e-42)
                      		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
                      	elseif (b <= 4.7e-32)
                      		tmp = sqrt((a * (c * -3.0))) / (a * 3.0);
                      	else
                      		tmp = (c / b) * -0.5;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[a_, b_, c_] := If[LessEqual[b, -4.2e-42], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.7e-32], N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;b \leq -4.2 \cdot 10^{-42}:\\
                      \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\
                      
                      \mathbf{elif}\;b \leq 4.7 \cdot 10^{-32}:\\
                      \;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)}}{a \cdot 3}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{c}{b} \cdot -0.5\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if b < -4.20000000000000013e-42

                        1. Initial program 62.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. Simplified62.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 -inf 86.1%

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

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

                          if -4.20000000000000013e-42 < b < 4.70000000000000019e-32

                          1. Initial program 78.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. sqr-neg78.2%

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

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

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

                            \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
                          4. Add Preprocessing
                          5. Step-by-step derivation
                            1. add-cube-cbrt77.6%

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{{\left(\sqrt[3]{c \cdot \left(3 \cdot a\right)}\right)}^{3}}}}{3 \cdot a} \]
                          9. Taylor expanded in c 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} \]
                          10. 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-sqrt67.4%

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

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

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

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

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

                          if 4.70000000000000019e-32 < b

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

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

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

                          Alternative 6: 71.5% accurate, 1.0× speedup?

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

                            1. Initial program 65.4%

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

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

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

                              if -5.9999999999999998e-169 < b < 4.19999999999999991e-209

                              1. Initial program 88.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. sqr-neg88.7%

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

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

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

                                \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
                              4. Add Preprocessing
                              5. Step-by-step derivation
                                1. add-cube-cbrt87.9%

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{{\left(\sqrt[3]{c \cdot \left(3 \cdot a\right)}\right)}^{3}}}}{3 \cdot a} \]
                              9. Taylor expanded in c 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)} \]
                              10. 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-sqrt33.1%

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

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

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

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

                              if 4.19999999999999991e-209 < b

                              1. Initial program 26.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. Simplified26.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 75.3%

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

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

                              Alternative 7: 68.0% accurate, 7.2× speedup?

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

                                1. Initial program 67.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. Simplified67.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 66.3%

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

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

                                  if -1.000000000000002e-309 < b

                                  1. Initial program 36.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. Simplified36.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 65.3%

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

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

                                  Alternative 8: 67.8% accurate, 9.7× speedup?

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{-2 \cdot \frac{b}{a \cdot {\left(\sqrt[3]{3}\right)}^{3}}} \]
                                    8. Step-by-step derivation
                                      1. *-commutative63.4%

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

                                        \[\leadsto \frac{b}{a \cdot \color{blue}{3}} \cdot -2 \]
                                    9. Simplified63.8%

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

                                    if 1.8500000000000001e-255 < b

                                    1. Initial program 32.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. Simplified32.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 69.7%

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

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

                                    Alternative 9: 67.8% accurate, 11.6× speedup?

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

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

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

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

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

                                        \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
                                      4. Add Preprocessing
                                      5. Step-by-step derivation
                                        1. add-cube-cbrt68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 1.8500000000000001e-255 < b

                                      1. Initial program 32.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. Simplified32.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 69.7%

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

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

                                      Alternative 10: 35.0% accurate, 23.2× speedup?

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

                                          \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
                                        4. Final simplification32.1%

                                          \[\leadsto \frac{c}{b} \cdot -0.5 \]
                                        5. Add Preprocessing

                                        Reproduce

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