Cubic critical

Percentage Accurate: 52.4% → 86.0%
Time: 12.1s
Alternatives: 12
Speedup: 11.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

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

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

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

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

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


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

    1. Initial program 46.6%

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
      4. Step-by-step derivation
        1. mul-1-neg94.1%

          \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
        2. *-commutative94.1%

          \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
        3. distribute-rgt-neg-in94.1%

          \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
        4. fma-define94.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
        5. associate-*r/94.0%

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

          \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
      5. Simplified94.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
      6. Taylor expanded in c around 0 94.8%

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

      if -1.84999999999999996e139 < b < 9.49999999999999991e-13

      1. Initial program 80.6%

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

      if 9.49999999999999991e-13 < b

      1. Initial program 10.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. Simplified10.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 68.7%

          \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
        4. Step-by-step derivation
          1. associate-/l*79.2%

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

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

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

            \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
          2. *-commutative87.6%

            \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
        8. Simplified87.6%

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

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

      Alternative 2: 86.0% accurate, 0.9× speedup?

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

        1. Initial program 46.6%

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

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

            \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
          4. Step-by-step derivation
            1. mul-1-neg94.1%

              \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
            2. *-commutative94.1%

              \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
            3. distribute-rgt-neg-in94.1%

              \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
            4. fma-define94.1%

              \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
            5. associate-*r/94.0%

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

              \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
          5. Simplified94.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
          6. Taylor expanded in c around 0 94.8%

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

          if -2.70000000000000018e140 < b < 8.50000000000000007e-15

          1. Initial program 80.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. sqr-neg80.6%

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

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

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

          1. Initial program 10.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. Simplified10.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 68.7%

              \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
            4. Step-by-step derivation
              1. associate-/l*79.2%

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

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

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

                \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
              2. *-commutative87.6%

                \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
            8. Simplified87.6%

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

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

          Alternative 3: 80.7% accurate, 1.0× speedup?

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

            1. Initial program 69.9%

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

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

                \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
              4. Step-by-step derivation
                1. mul-1-neg83.8%

                  \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
                2. *-commutative83.8%

                  \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
                3. distribute-rgt-neg-in83.8%

                  \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
                4. fma-define83.8%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
                5. associate-*r/83.9%

                  \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
                6. metadata-eval83.9%

                  \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
              5. Simplified83.9%

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

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

              if -7.6000000000000001e-96 < b < 8.50000000000000007e-15

              1. Initial program 74.7%

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

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

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

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

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

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

                if 8.50000000000000007e-15 < b

                1. Initial program 10.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. Simplified10.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 68.7%

                    \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
                  4. Step-by-step derivation
                    1. associate-/l*79.2%

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

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

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

                      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
                    2. *-commutative87.6%

                      \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
                  8. Simplified87.6%

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

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

                Alternative 4: 80.7% accurate, 1.0× speedup?

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

                  1. Initial program 69.9%

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

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

                      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
                    4. Step-by-step derivation
                      1. mul-1-neg83.8%

                        \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
                      2. *-commutative83.8%

                        \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
                      3. distribute-rgt-neg-in83.8%

                        \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
                      4. fma-define83.8%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
                      5. associate-*r/83.9%

                        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
                      6. metadata-eval83.9%

                        \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
                    5. Simplified83.9%

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

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

                    if -1.85000000000000009e-90 < b < 2.5499999999999999e-14

                    1. Initial program 74.7%

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

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

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

                      if 2.5499999999999999e-14 < b

                      1. Initial program 10.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. Simplified10.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 68.7%

                          \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
                        4. Step-by-step derivation
                          1. associate-/l*79.2%

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

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

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

                            \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
                          2. *-commutative87.6%

                            \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
                        8. Simplified87.6%

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

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

                      Alternative 5: 80.4% accurate, 1.0× speedup?

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

                        1. Initial program 69.9%

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

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

                            \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
                          4. Step-by-step derivation
                            1. mul-1-neg83.8%

                              \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
                            2. *-commutative83.8%

                              \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
                            3. distribute-rgt-neg-in83.8%

                              \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
                            4. fma-define83.8%

                              \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
                            5. associate-*r/83.9%

                              \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
                            6. metadata-eval83.9%

                              \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
                          5. Simplified83.9%

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

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

                          if -2.4999999999999998e-94 < b < 8.50000000000000007e-15

                          1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 8.50000000000000007e-15 < b

                          1. Initial program 10.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. Simplified10.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 68.7%

                              \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
                            4. Step-by-step derivation
                              1. associate-/l*79.2%

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

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

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

                                \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
                              2. *-commutative87.6%

                                \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
                            8. Simplified87.6%

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

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

                          Alternative 6: 71.8% accurate, 1.0× speedup?

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

                            1. Initial program 70.2%

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

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

                                \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
                              4. Step-by-step derivation
                                1. mul-1-neg83.0%

                                  \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
                                2. *-commutative83.0%

                                  \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
                                3. distribute-rgt-neg-in83.0%

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

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
                                5. associate-*r/83.1%

                                  \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
                                6. metadata-eval83.1%

                                  \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
                              5. Simplified83.1%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
                              6. Taylor expanded in c around 0 83.5%

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

                              if -6.7999999999999998e-97 < b < 1.29999999999999994e-157

                              1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

                              if 1.29999999999999994e-157 < b

                              1. Initial program 21.0%

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

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

                                  \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
                                4. Step-by-step derivation
                                  1. associate-/l*68.5%

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

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

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

                                    \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
                                  2. *-commutative76.6%

                                    \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
                                8. Simplified76.6%

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

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

                              Alternative 7: 67.5% accurate, 7.2× speedup?

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

                                1. Initial program 74.9%

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

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

                                    \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
                                  4. Step-by-step derivation
                                    1. mul-1-neg65.8%

                                      \[\leadsto \color{blue}{-b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)} \]
                                    2. *-commutative65.8%

                                      \[\leadsto -\color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot b} \]
                                    3. distribute-rgt-neg-in65.8%

                                      \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right) \cdot \left(-b\right)} \]
                                    4. fma-define65.8%

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, 0.6666666666666666 \cdot \frac{1}{a}\right)} \cdot \left(-b\right) \]
                                    5. associate-*r/65.9%

                                      \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \color{blue}{\frac{0.6666666666666666 \cdot 1}{a}}\right) \cdot \left(-b\right) \]
                                    6. metadata-eval65.9%

                                      \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{\color{blue}{0.6666666666666666}}{a}\right) \cdot \left(-b\right) \]
                                  5. Simplified65.9%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{{b}^{2}}, \frac{0.6666666666666666}{a}\right) \cdot \left(-b\right)} \]
                                  6. Taylor expanded in c around 0 66.5%

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

                                  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 49.3%

                                      \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
                                    4. Step-by-step derivation
                                      1. associate-/l*58.2%

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

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

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

                                        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
                                      2. *-commutative64.9%

                                        \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
                                    8. Simplified64.9%

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

                                  Alternative 8: 67.4% accurate, 11.6× speedup?

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

                                    1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto b \cdot \color{blue}{\frac{1}{\frac{a}{-0.6666666666666666}}} \]
                                        2. un-div-inv63.4%

                                          \[\leadsto \color{blue}{\frac{b}{\frac{a}{-0.6666666666666666}}} \]
                                        3. div-inv63.5%

                                          \[\leadsto \frac{b}{\color{blue}{a \cdot \frac{1}{-0.6666666666666666}}} \]
                                        4. metadata-eval63.5%

                                          \[\leadsto \frac{b}{a \cdot \color{blue}{-1.5}} \]
                                      10. Applied egg-rr63.5%

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

                                      if 2.69999999999999993e-272 < b

                                      1. Initial program 28.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. Simplified28.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 51.1%

                                          \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
                                        4. Step-by-step derivation
                                          1. associate-/l*60.4%

                                            \[\leadsto \frac{-1.5 \cdot \color{blue}{\left(a \cdot \frac{c}{b}\right)}}{3 \cdot a} \]
                                        5. Simplified60.4%

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

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

                                            \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
                                          2. *-commutative67.3%

                                            \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
                                        8. Simplified67.3%

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

                                      Alternative 9: 67.4% accurate, 11.6× speedup?

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

                                        1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto b \cdot \color{blue}{\frac{1}{\frac{a}{-0.6666666666666666}}} \]
                                            2. un-div-inv63.4%

                                              \[\leadsto \color{blue}{\frac{b}{\frac{a}{-0.6666666666666666}}} \]
                                            3. div-inv63.5%

                                              \[\leadsto \frac{b}{\color{blue}{a \cdot \frac{1}{-0.6666666666666666}}} \]
                                            4. metadata-eval63.5%

                                              \[\leadsto \frac{b}{a \cdot \color{blue}{-1.5}} \]
                                          10. Applied egg-rr63.5%

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

                                          if 2.69999999999999993e-272 < b

                                          1. Initial program 28.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. Simplified28.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 67.3%

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

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

                                          Alternative 10: 67.4% accurate, 11.6× speedup?

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

                                            1. Initial program 75.8%

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

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

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

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

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

                                              if 2.69999999999999993e-272 < b

                                              1. Initial program 28.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. Simplified28.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 67.3%

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

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

                                              Alternative 11: 67.4% accurate, 11.6× speedup?

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

                                                1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

                                                  if 2.69999999999999993e-272 < b

                                                  1. Initial program 28.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. Simplified28.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 67.3%

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

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

                                                  Alternative 12: 35.1% accurate, 23.2× speedup?

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

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

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

                                                    Reproduce

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