Cubic critical

Percentage Accurate: 52.3% → 84.7%
Time: 13.6s
Alternatives: 13
Speedup: 11.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 52.3% accurate, 1.0× speedup?

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

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

Alternative 1: 84.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+153}:\\
\;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\

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

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


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

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

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

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

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

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

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

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

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

      if -1e153 < b < 6.5999999999999996

      1. Initial program 83.5%

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

      if 6.5999999999999996 < b

      1. Initial program 8.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. Simplified8.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 91.5%

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

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

      Alternative 2: 84.6% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

          if -7.50000000000000065e153 < b < 6.5999999999999996

          1. Initial program 83.5%

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

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

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

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

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

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

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

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

          if 6.5999999999999996 < b

          1. Initial program 8.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. Simplified8.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 91.5%

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

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

          Alternative 3: 84.6% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

              if -6.9999999999999998e153 < b < 80

              1. Initial program 83.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. sqr-neg83.5%

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

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

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

                \[\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 80 < b

              1. Initial program 8.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. Simplified8.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 91.5%

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

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

              Alternative 4: 79.3% accurate, 0.9× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{-87}:\\ \;\;\;\;\mathsf{fma}\left(0.16666666666666666, 3 \cdot \frac{c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right)\\ \mathbf{elif}\;b \leq 85000:\\ \;\;\;\;\frac{1}{\frac{a \cdot 3}{\sqrt{c \cdot \left(a \cdot -3\right)} - b}}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
              (FPCore (a b c)
               :precision binary64
               (if (<= b -2.9e-87)
                 (fma 0.16666666666666666 (* 3.0 (/ c b)) (* -0.6666666666666666 (/ b a)))
                 (if (<= b 85000.0)
                   (/ 1.0 (/ (* a 3.0) (- (sqrt (* c (* a -3.0))) b)))
                   (* -0.5 (/ c b)))))
              double code(double a, double b, double c) {
              	double tmp;
              	if (b <= -2.9e-87) {
              		tmp = fma(0.16666666666666666, (3.0 * (c / b)), (-0.6666666666666666 * (b / a)));
              	} else if (b <= 85000.0) {
              		tmp = 1.0 / ((a * 3.0) / (sqrt((c * (a * -3.0))) - b));
              	} else {
              		tmp = -0.5 * (c / b);
              	}
              	return tmp;
              }
              
              function code(a, b, c)
              	tmp = 0.0
              	if (b <= -2.9e-87)
              		tmp = fma(0.16666666666666666, Float64(3.0 * Float64(c / b)), Float64(-0.6666666666666666 * Float64(b / a)));
              	elseif (b <= 85000.0)
              		tmp = Float64(1.0 / Float64(Float64(a * 3.0) / Float64(sqrt(Float64(c * Float64(a * -3.0))) - b)));
              	else
              		tmp = Float64(-0.5 * Float64(c / b));
              	end
              	return tmp
              end
              
              code[a_, b_, c_] := If[LessEqual[b, -2.9e-87], N[(0.16666666666666666 * N[(3.0 * N[(c / b), $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 85000.0], N[(1.0 / N[(N[(a * 3.0), $MachinePrecision] / N[(N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;b \leq -2.9 \cdot 10^{-87}:\\
              \;\;\;\;\mathsf{fma}\left(0.16666666666666666, 3 \cdot \frac{c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right)\\
              
              \mathbf{elif}\;b \leq 85000:\\
              \;\;\;\;\frac{1}{\frac{a \cdot 3}{\sqrt{c \cdot \left(a \cdot -3\right)} - b}}\\
              
              \mathbf{else}:\\
              \;\;\;\;-0.5 \cdot \frac{c}{b}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if b < -2.8999999999999999e-87

                1. Initial program 75.0%

                  \[\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-sqr-sqrt43.6%

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

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

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

                  \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{c \cdot {\left(\sqrt{3}\right)}^{2}}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
                6. Taylor expanded in c around 0 83.0%

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(0.16666666666666666, \frac{\color{blue}{\left(\sqrt{3} \cdot \sqrt{3}\right)} \cdot c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right) \]
                  5. rem-square-sqrt83.0%

                    \[\leadsto \mathsf{fma}\left(0.16666666666666666, \frac{\color{blue}{3} \cdot c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right) \]
                  6. *-lft-identity83.0%

                    \[\leadsto \mathsf{fma}\left(0.16666666666666666, \frac{3 \cdot c}{\color{blue}{1 \cdot b}}, -0.6666666666666666 \cdot \frac{b}{a}\right) \]
                  7. times-frac83.0%

                    \[\leadsto \mathsf{fma}\left(0.16666666666666666, \color{blue}{\frac{3}{1} \cdot \frac{c}{b}}, -0.6666666666666666 \cdot \frac{b}{a}\right) \]
                  8. metadata-eval83.0%

                    \[\leadsto \mathsf{fma}\left(0.16666666666666666, \color{blue}{3} \cdot \frac{c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right) \]
                  9. *-commutative83.0%

                    \[\leadsto \mathsf{fma}\left(0.16666666666666666, 3 \cdot \frac{c}{b}, \color{blue}{\frac{b}{a} \cdot -0.6666666666666666}\right) \]
                8. Simplified83.0%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, 3 \cdot \frac{c}{b}, \frac{b}{a} \cdot -0.6666666666666666\right)} \]

                if -2.8999999999999999e-87 < b < 85000

                1. Initial program 75.4%

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

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

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

                      \[\leadsto \frac{\color{blue}{\sqrt{-3 \cdot a} \cdot \sqrt{c}} - b}{3 \cdot a} \]
                    3. metadata-eval34.1%

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

                      \[\leadsto \frac{\sqrt{\color{blue}{-3 \cdot a}} \cdot \sqrt{c} - b}{3 \cdot a} \]
                    5. *-commutative34.1%

                      \[\leadsto \frac{\sqrt{-\color{blue}{a \cdot 3}} \cdot \sqrt{c} - b}{3 \cdot a} \]
                    6. distribute-rgt-neg-in34.1%

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

                      \[\leadsto \frac{\sqrt{a \cdot \color{blue}{-3}} \cdot \sqrt{c} - b}{3 \cdot a} \]
                  5. Applied egg-rr34.1%

                    \[\leadsto \frac{\color{blue}{\sqrt{a \cdot -3} \cdot \sqrt{c}} - b}{3 \cdot a} \]
                  6. Step-by-step derivation
                    1. clear-num34.1%

                      \[\leadsto \color{blue}{\frac{1}{\frac{3 \cdot a}{\sqrt{a \cdot -3} \cdot \sqrt{c} - b}}} \]
                    2. inv-pow34.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 85000 < b

                  1. Initial program 8.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. Simplified8.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 91.5%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{-87}:\\ \;\;\;\;\mathsf{fma}\left(0.16666666666666666, 3 \cdot \frac{c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right)\\ \mathbf{elif}\;b \leq 85000:\\ \;\;\;\;\frac{1}{\frac{a \cdot 3}{\sqrt{c \cdot \left(a \cdot -3\right)} - b}}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 5: 79.2% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.8 \cdot 10^{-85}:\\ \;\;\;\;\mathsf{fma}\left(0.16666666666666666, 3 \cdot \frac{c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right)\\ \mathbf{elif}\;b \leq 1250000000:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
                  (FPCore (a b c)
                   :precision binary64
                   (if (<= b -4.8e-85)
                     (fma 0.16666666666666666 (* 3.0 (/ c b)) (* -0.6666666666666666 (/ b a)))
                     (if (<= b 1250000000.0)
                       (/ (- (sqrt (* c (* a -3.0))) b) (* a 3.0))
                       (* -0.5 (/ c b)))))
                  double code(double a, double b, double c) {
                  	double tmp;
                  	if (b <= -4.8e-85) {
                  		tmp = fma(0.16666666666666666, (3.0 * (c / b)), (-0.6666666666666666 * (b / a)));
                  	} else if (b <= 1250000000.0) {
                  		tmp = (sqrt((c * (a * -3.0))) - b) / (a * 3.0);
                  	} else {
                  		tmp = -0.5 * (c / b);
                  	}
                  	return tmp;
                  }
                  
                  function code(a, b, c)
                  	tmp = 0.0
                  	if (b <= -4.8e-85)
                  		tmp = fma(0.16666666666666666, Float64(3.0 * Float64(c / b)), Float64(-0.6666666666666666 * Float64(b / a)));
                  	elseif (b <= 1250000000.0)
                  		tmp = Float64(Float64(sqrt(Float64(c * Float64(a * -3.0))) - b) / Float64(a * 3.0));
                  	else
                  		tmp = Float64(-0.5 * Float64(c / b));
                  	end
                  	return tmp
                  end
                  
                  code[a_, b_, c_] := If[LessEqual[b, -4.8e-85], N[(0.16666666666666666 * N[(3.0 * N[(c / b), $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1250000000.0], N[(N[(N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;b \leq -4.8 \cdot 10^{-85}:\\
                  \;\;\;\;\mathsf{fma}\left(0.16666666666666666, 3 \cdot \frac{c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right)\\
                  
                  \mathbf{elif}\;b \leq 1250000000:\\
                  \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;-0.5 \cdot \frac{c}{b}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if b < -4.8000000000000001e-85

                    1. Initial program 75.0%

                      \[\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-sqr-sqrt43.6%

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

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

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

                      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{c \cdot {\left(\sqrt{3}\right)}^{2}}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
                    6. Taylor expanded in c around 0 83.0%

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(0.16666666666666666, \frac{\color{blue}{\left(\sqrt{3} \cdot \sqrt{3}\right)} \cdot c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right) \]
                      5. rem-square-sqrt83.0%

                        \[\leadsto \mathsf{fma}\left(0.16666666666666666, \frac{\color{blue}{3} \cdot c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right) \]
                      6. *-lft-identity83.0%

                        \[\leadsto \mathsf{fma}\left(0.16666666666666666, \frac{3 \cdot c}{\color{blue}{1 \cdot b}}, -0.6666666666666666 \cdot \frac{b}{a}\right) \]
                      7. times-frac83.0%

                        \[\leadsto \mathsf{fma}\left(0.16666666666666666, \color{blue}{\frac{3}{1} \cdot \frac{c}{b}}, -0.6666666666666666 \cdot \frac{b}{a}\right) \]
                      8. metadata-eval83.0%

                        \[\leadsto \mathsf{fma}\left(0.16666666666666666, \color{blue}{3} \cdot \frac{c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right) \]
                      9. *-commutative83.0%

                        \[\leadsto \mathsf{fma}\left(0.16666666666666666, 3 \cdot \frac{c}{b}, \color{blue}{\frac{b}{a} \cdot -0.6666666666666666}\right) \]
                    8. Simplified83.0%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(0.16666666666666666, 3 \cdot \frac{c}{b}, \frac{b}{a} \cdot -0.6666666666666666\right)} \]

                    if -4.8000000000000001e-85 < b < 1.25e9

                    1. Initial program 75.4%

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

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

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

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

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

                      if 1.25e9 < b

                      1. Initial program 8.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. Simplified8.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 91.5%

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.8 \cdot 10^{-85}:\\ \;\;\;\;\mathsf{fma}\left(0.16666666666666666, 3 \cdot \frac{c}{b}, -0.6666666666666666 \cdot \frac{b}{a}\right)\\ \mathbf{elif}\;b \leq 1250000000:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
                      5. Add Preprocessing

                      Alternative 6: 79.4% accurate, 1.0× speedup?

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

                        1. Initial program 75.0%

                          \[\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-sqr-sqrt43.6%

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{\color{blue}{\sqrt{b} \cdot \sqrt{b}}} \cdot \sqrt{\frac{c \cdot {\left(\sqrt{3}\right)}^{2}}{b \cdot b}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                          8. add-sqr-sqrt40.8%

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

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

                            \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot \color{blue}{{3}^{\left(\frac{2}{2}\right)}}}}{\sqrt{b \cdot b}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                          11. metadata-eval40.8%

                            \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot {3}^{\color{blue}{1}}}}{\sqrt{b \cdot b}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                          12. metadata-eval40.8%

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

                            \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot 3}}{\color{blue}{\sqrt{b} \cdot \sqrt{b}}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                          14. add-sqr-sqrt41.3%

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

                          \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \color{blue}{\left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot 3}}{b}\right)} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                        8. Step-by-step derivation
                          1. associate-*l/41.3%

                            \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \color{blue}{\frac{\sqrt{c \cdot 3} \cdot \frac{\sqrt{c \cdot 3}}{b}}{b}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                          2. associate-*r/41.3%

                            \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{\frac{\sqrt{c \cdot 3} \cdot \sqrt{c \cdot 3}}{b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                          3. rem-square-sqrt82.9%

                            \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{\color{blue}{c \cdot 3}}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                          4. *-commutative82.9%

                            \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{\color{blue}{3 \cdot c}}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                          5. *-lft-identity82.9%

                            \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{3 \cdot c}{\color{blue}{1 \cdot b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                          6. times-frac82.9%

                            \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{\frac{3}{1} \cdot \frac{c}{b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                          7. metadata-eval82.9%

                            \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{3} \cdot \frac{c}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                        9. Simplified82.9%

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

                        if -3.7999999999999999e-85 < b < 6.5999999999999996

                        1. Initial program 75.4%

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

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

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

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

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

                          if 6.5999999999999996 < b

                          1. Initial program 8.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. Simplified8.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 91.5%

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

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

                          Alternative 7: 79.3% accurate, 1.0× speedup?

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

                            1. Initial program 75.0%

                              \[\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-sqr-sqrt43.6%

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{\color{blue}{\sqrt{b} \cdot \sqrt{b}}} \cdot \sqrt{\frac{c \cdot {\left(\sqrt{3}\right)}^{2}}{b \cdot b}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                              8. add-sqr-sqrt40.8%

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

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

                                \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot \color{blue}{{3}^{\left(\frac{2}{2}\right)}}}}{\sqrt{b \cdot b}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                              11. metadata-eval40.8%

                                \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot {3}^{\color{blue}{1}}}}{\sqrt{b \cdot b}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                              12. metadata-eval40.8%

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

                                \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot 3}}{\color{blue}{\sqrt{b} \cdot \sqrt{b}}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                              14. add-sqr-sqrt41.3%

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

                              \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \color{blue}{\left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot 3}}{b}\right)} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                            8. Step-by-step derivation
                              1. associate-*l/41.3%

                                \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \color{blue}{\frac{\sqrt{c \cdot 3} \cdot \frac{\sqrt{c \cdot 3}}{b}}{b}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                              2. associate-*r/41.3%

                                \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{\frac{\sqrt{c \cdot 3} \cdot \sqrt{c \cdot 3}}{b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                              3. rem-square-sqrt82.9%

                                \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{\color{blue}{c \cdot 3}}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                              4. *-commutative82.9%

                                \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{\color{blue}{3 \cdot c}}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                              5. *-lft-identity82.9%

                                \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{3 \cdot c}{\color{blue}{1 \cdot b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                              6. times-frac82.9%

                                \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{\frac{3}{1} \cdot \frac{c}{b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                              7. metadata-eval82.9%

                                \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{3} \cdot \frac{c}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                            9. Simplified82.9%

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

                            if -5.10000000000000006e-86 < b < 6.5999999999999996

                            1. Initial program 75.4%

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

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

                              if 6.5999999999999996 < b

                              1. Initial program 8.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. Simplified8.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 91.5%

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

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

                              Alternative 8: 79.2% accurate, 1.0× speedup?

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

                                1. Initial program 75.0%

                                  \[\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-sqr-sqrt43.6%

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{\color{blue}{\sqrt{b} \cdot \sqrt{b}}} \cdot \sqrt{\frac{c \cdot {\left(\sqrt{3}\right)}^{2}}{b \cdot b}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                  8. add-sqr-sqrt40.8%

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

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

                                    \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot \color{blue}{{3}^{\left(\frac{2}{2}\right)}}}}{\sqrt{b \cdot b}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                  11. metadata-eval40.8%

                                    \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot {3}^{\color{blue}{1}}}}{\sqrt{b \cdot b}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                  12. metadata-eval40.8%

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

                                    \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot 3}}{\color{blue}{\sqrt{b} \cdot \sqrt{b}}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                  14. add-sqr-sqrt41.3%

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

                                  \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \color{blue}{\left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot 3}}{b}\right)} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                8. Step-by-step derivation
                                  1. associate-*l/41.3%

                                    \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \color{blue}{\frac{\sqrt{c \cdot 3} \cdot \frac{\sqrt{c \cdot 3}}{b}}{b}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                  2. associate-*r/41.3%

                                    \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{\frac{\sqrt{c \cdot 3} \cdot \sqrt{c \cdot 3}}{b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                  3. rem-square-sqrt82.9%

                                    \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{\color{blue}{c \cdot 3}}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                  4. *-commutative82.9%

                                    \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{\color{blue}{3 \cdot c}}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                  5. *-lft-identity82.9%

                                    \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{3 \cdot c}{\color{blue}{1 \cdot b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                  6. times-frac82.9%

                                    \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{\frac{3}{1} \cdot \frac{c}{b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                  7. metadata-eval82.9%

                                    \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{3} \cdot \frac{c}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                9. Simplified82.9%

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

                                if -5.3000000000000001e-89 < b < 12

                                1. Initial program 75.4%

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

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

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

                                      \[\leadsto \frac{\color{blue}{\sqrt{-3 \cdot a} \cdot \sqrt{c}} - b}{3 \cdot a} \]
                                    3. metadata-eval34.1%

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

                                      \[\leadsto \frac{\sqrt{\color{blue}{-3 \cdot a}} \cdot \sqrt{c} - b}{3 \cdot a} \]
                                    5. *-commutative34.1%

                                      \[\leadsto \frac{\sqrt{-\color{blue}{a \cdot 3}} \cdot \sqrt{c} - b}{3 \cdot a} \]
                                    6. distribute-rgt-neg-in34.1%

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

                                      \[\leadsto \frac{\sqrt{a \cdot \color{blue}{-3}} \cdot \sqrt{c} - b}{3 \cdot a} \]
                                  5. Applied egg-rr34.1%

                                    \[\leadsto \frac{\color{blue}{\sqrt{a \cdot -3} \cdot \sqrt{c}} - b}{3 \cdot a} \]
                                  6. Step-by-step derivation
                                    1. div-sub34.1%

                                      \[\leadsto \color{blue}{\frac{\sqrt{a \cdot -3} \cdot \sqrt{c}}{3 \cdot a} - \frac{b}{3 \cdot a}} \]
                                    2. sqrt-unprod70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 12 < b

                                  1. Initial program 8.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. Simplified8.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 91.5%

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

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

                                  Alternative 9: 66.9% accurate, 5.3× speedup?

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

                                    1. Initial program 78.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-sqr-sqrt46.8%

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

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

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

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

                                        \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{c \cdot {\left(\sqrt{3}\right)}^{2}}{\color{blue}{b \cdot b}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                      2. add-sqr-sqrt52.2%

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

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

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

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

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

                                        \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \left(\frac{\sqrt{c \cdot 3}}{\color{blue}{\sqrt{b} \cdot \sqrt{b}}} \cdot \sqrt{\frac{c \cdot {\left(\sqrt{3}\right)}^{2}}{b \cdot b}}\right) + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                      8. add-sqr-sqrt33.2%

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

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

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

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

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

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

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

                                      \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \color{blue}{\left(\frac{\sqrt{c \cdot 3}}{b} \cdot \frac{\sqrt{c \cdot 3}}{b}\right)} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                    8. Step-by-step derivation
                                      1. associate-*l/33.8%

                                        \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \color{blue}{\frac{\sqrt{c \cdot 3} \cdot \frac{\sqrt{c \cdot 3}}{b}}{b}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                      2. associate-*r/33.8%

                                        \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{\frac{\sqrt{c \cdot 3} \cdot \sqrt{c \cdot 3}}{b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                      3. rem-square-sqrt69.7%

                                        \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{\color{blue}{c \cdot 3}}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                      4. *-commutative69.7%

                                        \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{\color{blue}{3 \cdot c}}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                      5. *-lft-identity69.7%

                                        \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\frac{3 \cdot c}{\color{blue}{1 \cdot b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                      6. times-frac69.7%

                                        \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{\frac{3}{1} \cdot \frac{c}{b}}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                      7. metadata-eval69.7%

                                        \[\leadsto -1 \cdot \left(b \cdot \left(-0.16666666666666666 \cdot \frac{\color{blue}{3} \cdot \frac{c}{b}}{b} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right) \]
                                    9. Simplified69.7%

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

                                    if -9.999999999999969e-311 < b

                                    1. Initial program 31.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. Simplified31.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 65.3%

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

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

                                    Alternative 10: 66.8% accurate, 9.7× speedup?

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

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

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

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

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

                                        if -9.999999999999969e-311 < b

                                        1. Initial program 31.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. Simplified31.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 65.3%

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

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

                                        Alternative 11: 66.8% accurate, 11.6× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\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 -1e-310) (/ (* b -0.6666666666666666) a) (* -0.5 (/ c b))))
                                        double code(double a, double b, double c) {
                                        	double tmp;
                                        	if (b <= -1e-310) {
                                        		tmp = (b * -0.6666666666666666) / a;
                                        	} else {
                                        		tmp = -0.5 * (c / b);
                                        	}
                                        	return tmp;
                                        }
                                        
                                        real(8) function code(a, b, c)
                                            real(8), intent (in) :: a
                                            real(8), intent (in) :: b
                                            real(8), intent (in) :: c
                                            real(8) :: tmp
                                            if (b <= (-1d-310)) then
                                                tmp = (b * (-0.6666666666666666d0)) / a
                                            else
                                                tmp = (-0.5d0) * (c / b)
                                            end if
                                            code = tmp
                                        end function
                                        
                                        public static double code(double a, double b, double c) {
                                        	double tmp;
                                        	if (b <= -1e-310) {
                                        		tmp = (b * -0.6666666666666666) / a;
                                        	} else {
                                        		tmp = -0.5 * (c / b);
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(a, b, c):
                                        	tmp = 0
                                        	if b <= -1e-310:
                                        		tmp = (b * -0.6666666666666666) / a
                                        	else:
                                        		tmp = -0.5 * (c / b)
                                        	return tmp
                                        
                                        function code(a, b, c)
                                        	tmp = 0.0
                                        	if (b <= -1e-310)
                                        		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 <= -1e-310)
                                        		tmp = (b * -0.6666666666666666) / a;
                                        	else
                                        		tmp = -0.5 * (c / b);
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[a_, b_, c_] := If[LessEqual[b, -1e-310], 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 -1 \cdot 10^{-310}:\\
                                        \;\;\;\;\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 < -9.999999999999969e-311

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
                                            8. Simplified69.3%

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

                                            if -9.999999999999969e-311 < b

                                            1. Initial program 31.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. Simplified31.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 65.3%

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

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

                                            Alternative 12: 66.7% accurate, 11.6× speedup?

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

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

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

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

                                                  \[\leadsto \color{blue}{\frac{b}{a} \cdot -0.6666666666666666} \]
                                                6. Taylor expanded in b around 0 69.2%

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

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

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

                                                    \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
                                                8. Simplified69.3%

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

                                                if 1.5800000000000001e-298 < b

                                                1. Initial program 31.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. Simplified31.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 65.3%

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

                                                Alternative 13: 34.7% accurate, 23.2× speedup?

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

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

                                                  Reproduce

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