Cubic critical

Percentage Accurate: 52.5% → 85.2%
Time: 8.7s
Alternatives: 10
Speedup: 2.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 52.5% accurate, 1.0× speedup?

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

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

Alternative 1: 85.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+128}:\\ \;\;\;\;\frac{\frac{-b}{a}}{1.5}\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{-55}:\\ \;\;\;\;\frac{1}{\frac{-3}{b - \sqrt{\mathsf{fma}\left(-3 \cdot c, a, b \cdot b\right)}} \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-0.5625 \cdot c, \frac{a}{{b}^{5}} \cdot a, -0.375 \cdot \frac{a}{\left(b \cdot b\right) \cdot b}\right), c, \frac{-0.5}{b}\right) \cdot c\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -5.2e+128)
   (/ (/ (- b) a) 1.5)
   (if (<= b 1.6e-55)
     (/ 1.0 (* (/ -3.0 (- b (sqrt (fma (* -3.0 c) a (* b b))))) a))
     (*
      (fma
       (fma
        (* -0.5625 c)
        (* (/ a (pow b 5.0)) a)
        (* -0.375 (/ a (* (* b b) b))))
       c
       (/ -0.5 b))
      c))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -5.2e+128) {
		tmp = (-b / a) / 1.5;
	} else if (b <= 1.6e-55) {
		tmp = 1.0 / ((-3.0 / (b - sqrt(fma((-3.0 * c), a, (b * b))))) * a);
	} else {
		tmp = fma(fma((-0.5625 * c), ((a / pow(b, 5.0)) * a), (-0.375 * (a / ((b * b) * b)))), c, (-0.5 / b)) * c;
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -5.2e+128)
		tmp = Float64(Float64(Float64(-b) / a) / 1.5);
	elseif (b <= 1.6e-55)
		tmp = Float64(1.0 / Float64(Float64(-3.0 / Float64(b - sqrt(fma(Float64(-3.0 * c), a, Float64(b * b))))) * a));
	else
		tmp = Float64(fma(fma(Float64(-0.5625 * c), Float64(Float64(a / (b ^ 5.0)) * a), Float64(-0.375 * Float64(a / Float64(Float64(b * b) * b)))), c, Float64(-0.5 / b)) * c);
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -5.2e+128], N[(N[((-b) / a), $MachinePrecision] / 1.5), $MachinePrecision], If[LessEqual[b, 1.6e-55], N[(1.0 / N[(N[(-3.0 / N[(b - N[Sqrt[N[(N[(-3.0 * c), $MachinePrecision] * a + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(-0.5625 * c), $MachinePrecision] * N[(N[(a / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] + N[(-0.375 * N[(a / N[(N[(b * b), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c + N[(-0.5 / b), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{+128}:\\
\;\;\;\;\frac{\frac{-b}{a}}{1.5}\\

\mathbf{elif}\;b \leq 1.6 \cdot 10^{-55}:\\
\;\;\;\;\frac{1}{\frac{-3}{b - \sqrt{\mathsf{fma}\left(-3 \cdot c, a, b \cdot b\right)}} \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-0.5625 \cdot c, \frac{a}{{b}^{5}} \cdot a, -0.375 \cdot \frac{a}{\left(b \cdot b\right) \cdot b}\right), c, \frac{-0.5}{b}\right) \cdot c\\


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

    1. Initial program 43.9%

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

      \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
      2. lower-/.f6496.0

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

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

        \[\leadsto \frac{-1}{a} \cdot \color{blue}{\frac{b}{1.5}} \]
      2. Step-by-step derivation
        1. Applied rewrites96.2%

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

        if -5.2e128 < b < 1.6000000000000001e-55

        1. Initial program 81.4%

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

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

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

        if 1.6000000000000001e-55 < b

        1. Initial program 13.3%

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

          \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right) \cdot c} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right) \cdot c} \]
        5. Applied rewrites89.5%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(c \cdot -0.5625, a \cdot \frac{a}{{b}^{5}}, \frac{a}{\left(b \cdot b\right) \cdot b} \cdot -0.375\right), c, \frac{-0.5}{b}\right) \cdot c} \]
      3. Recombined 3 regimes into one program.
      4. Final simplification87.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+128}:\\ \;\;\;\;\frac{\frac{-b}{a}}{1.5}\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{-55}:\\ \;\;\;\;\frac{1}{\frac{-3}{b - \sqrt{\mathsf{fma}\left(-3 \cdot c, a, b \cdot b\right)}} \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-0.5625 \cdot c, \frac{a}{{b}^{5}} \cdot a, -0.375 \cdot \frac{a}{\left(b \cdot b\right) \cdot b}\right), c, \frac{-0.5}{b}\right) \cdot c\\ \end{array} \]
      5. Add Preprocessing

      Alternative 2: 85.7% accurate, 0.7× speedup?

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

        1. Initial program 43.9%

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

          \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
        4. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
          2. lower-/.f6496.0

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

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

            \[\leadsto \frac{-1}{a} \cdot \color{blue}{\frac{b}{1.5}} \]
          2. Step-by-step derivation
            1. Applied rewrites96.2%

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

            if -5.2e128 < b < 1.0500000000000001e-55

            1. Initial program 81.4%

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

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

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

            if 1.0500000000000001e-55 < b

            1. Initial program 13.3%

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

              \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
              2. lower-*.f64N/A

                \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
              3. lower-/.f6489.2

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+128}:\\ \;\;\;\;\frac{\frac{-b}{a}}{1.5}\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{-55}:\\ \;\;\;\;\frac{1}{\frac{-3}{b - \sqrt{\mathsf{fma}\left(-3 \cdot c, a, b \cdot b\right)}} \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
          5. Add Preprocessing

          Alternative 3: 85.7% accurate, 0.8× speedup?

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

            1. Initial program 39.2%

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

              \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
            4. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
              2. lower-/.f6495.7

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

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

                \[\leadsto \frac{-1}{a} \cdot \color{blue}{\frac{b}{1.5}} \]
              2. Step-by-step derivation
                1. Applied rewrites95.9%

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

                if -1.15e137 < b < 1.0500000000000001e-55

                1. Initial program 81.9%

                  \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{3 \cdot a}} \]
                  3. associate-/l/N/A

                    \[\leadsto \color{blue}{\frac{\frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{a}}{3}} \]
                  4. lower-/.f64N/A

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

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

                if 1.0500000000000001e-55 < b

                1. Initial program 13.3%

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

                  \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
                  3. lower-/.f6489.2

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

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

              Alternative 4: 85.7% accurate, 0.9× speedup?

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

                1. Initial program 39.2%

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

                  \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                4. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                  2. lower-/.f6495.7

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

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

                    \[\leadsto \frac{-1}{a} \cdot \color{blue}{\frac{b}{1.5}} \]
                  2. Step-by-step derivation
                    1. Applied rewrites95.9%

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

                    if -1.15e137 < b < 1.0500000000000001e-55

                    1. Initial program 81.9%

                      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-/.f64N/A

                        \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{3 \cdot a}} \]
                      3. associate-/l/N/A

                        \[\leadsto \color{blue}{\frac{\frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{a}}{3}} \]
                      4. div-invN/A

                        \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{a} \cdot \frac{1}{3}} \]
                      5. lower-*.f64N/A

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

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

                    if 1.0500000000000001e-55 < b

                    1. Initial program 13.3%

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

                      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
                      3. lower-/.f6489.2

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.15 \cdot 10^{+137}:\\ \;\;\;\;\frac{\frac{-b}{a}}{1.5}\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{-55}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\sqrt{\mathsf{fma}\left(-3 \cdot c, a, b \cdot b\right)} - b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 5: 80.7% accurate, 1.0× speedup?

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

                    1. Initial program 67.1%

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

                      \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                    4. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                      2. lower-/.f6482.8

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

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

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

                      if -6.5000000000000003e-87 < b < 9.4999999999999991e-56

                      1. Initial program 75.8%

                        \[\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. Applied rewrites75.8%

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

                          \[\leadsto \frac{\sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}} - b}{a \cdot 3} \]
                        3. Step-by-step derivation
                          1. lower-*.f64N/A

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

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

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

                        if 9.4999999999999991e-56 < b

                        1. Initial program 13.3%

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

                          \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
                          2. lower-*.f64N/A

                            \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
                          3. lower-/.f6489.2

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

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

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

                      Alternative 6: 67.5% accurate, 2.0× speedup?

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

                        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. Taylor expanded in b around -inf

                          \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                        4. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                          2. lower-/.f6457.3

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

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

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

                          if 2.2500000000000001e-247 < b

                          1. Initial program 22.5%

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

                            \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
                          4. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
                            2. lower-*.f64N/A

                              \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
                            3. lower-/.f6473.8

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

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

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

                        Alternative 7: 67.5% accurate, 2.2× speedup?

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

                          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. Taylor expanded in b around -inf

                            \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                          4. Step-by-step derivation
                            1. lower-*.f64N/A

                              \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                            2. lower-/.f6457.3

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

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

                              \[\leadsto -0.6666666666666666 \cdot \frac{1}{\color{blue}{\frac{a}{b}}} \]
                            2. Step-by-step derivation
                              1. Applied rewrites57.3%

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

                              if 2.2500000000000001e-247 < b

                              1. Initial program 22.5%

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

                                \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
                              4. Step-by-step derivation
                                1. *-commutativeN/A

                                  \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
                                3. lower-/.f6473.8

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

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

                            Alternative 8: 42.6% accurate, 2.2× speedup?

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

                              1. Initial program 69.0%

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

                                \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                              4. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                                2. lower-/.f6447.9

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

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

                                  \[\leadsto -0.6666666666666666 \cdot \frac{1}{\color{blue}{\frac{a}{b}}} \]
                                2. Step-by-step derivation
                                  1. Applied rewrites47.9%

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

                                  if 7.5e-11 < b

                                  1. Initial program 12.9%

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

                                    \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)\right)} \]
                                  4. Step-by-step derivation
                                    1. associate-*r*N/A

                                      \[\leadsto \color{blue}{\left(-1 \cdot b\right) \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)} \]
                                    2. mul-1-negN/A

                                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                    3. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)} \]
                                    4. lower-neg.f64N/A

                                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                    5. *-commutativeN/A

                                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\color{blue}{\frac{c}{{b}^{2}} \cdot \frac{-1}{2}} + \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                    6. lower-fma.f64N/A

                                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{c}{{b}^{2}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right)} \]
                                    7. lower-/.f64N/A

                                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\color{blue}{\frac{c}{{b}^{2}}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                    8. unpow2N/A

                                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{\color{blue}{b \cdot b}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                    9. lower-*.f64N/A

                                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{\color{blue}{b \cdot b}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                    10. associate-*r/N/A

                                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \color{blue}{\frac{\frac{2}{3} \cdot 1}{a}}\right) \]
                                    11. metadata-evalN/A

                                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{\color{blue}{\frac{2}{3}}}{a}\right) \]
                                    12. lower-/.f642.8

                                      \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, -0.5, \color{blue}{\frac{0.6666666666666666}{a}}\right) \]
                                  5. Applied rewrites2.8%

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

                                    \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{c}{b}} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites32.4%

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

                                  Alternative 9: 42.6% accurate, 2.2× speedup?

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

                                    1. Initial program 69.0%

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

                                      \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                                    4. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
                                      2. lower-/.f6447.9

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

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

                                    if 7.5e-11 < b

                                    1. Initial program 12.9%

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

                                      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)\right)} \]
                                    4. Step-by-step derivation
                                      1. associate-*r*N/A

                                        \[\leadsto \color{blue}{\left(-1 \cdot b\right) \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)} \]
                                      2. mul-1-negN/A

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)} \]
                                      4. lower-neg.f64N/A

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      5. *-commutativeN/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\color{blue}{\frac{c}{{b}^{2}} \cdot \frac{-1}{2}} + \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      6. lower-fma.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{c}{{b}^{2}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right)} \]
                                      7. lower-/.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\color{blue}{\frac{c}{{b}^{2}}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      8. unpow2N/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{\color{blue}{b \cdot b}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      9. lower-*.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{\color{blue}{b \cdot b}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      10. associate-*r/N/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \color{blue}{\frac{\frac{2}{3} \cdot 1}{a}}\right) \]
                                      11. metadata-evalN/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{\color{blue}{\frac{2}{3}}}{a}\right) \]
                                      12. lower-/.f642.8

                                        \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, -0.5, \color{blue}{\frac{0.6666666666666666}{a}}\right) \]
                                    5. Applied rewrites2.8%

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

                                      \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{c}{b}} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites32.4%

                                        \[\leadsto \frac{0.5}{b} \cdot \color{blue}{c} \]
                                    8. Recombined 2 regimes into one program.
                                    9. Final simplification43.9%

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

                                    Alternative 10: 10.6% accurate, 2.9× speedup?

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

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

                                      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)\right)} \]
                                    4. Step-by-step derivation
                                      1. associate-*r*N/A

                                        \[\leadsto \color{blue}{\left(-1 \cdot b\right) \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)} \]
                                      2. mul-1-negN/A

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)} \]
                                      4. lower-neg.f64N/A

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      5. *-commutativeN/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(\color{blue}{\frac{c}{{b}^{2}} \cdot \frac{-1}{2}} + \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      6. lower-fma.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{c}{{b}^{2}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right)} \]
                                      7. lower-/.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\color{blue}{\frac{c}{{b}^{2}}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      8. unpow2N/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{\color{blue}{b \cdot b}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      9. lower-*.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{\color{blue}{b \cdot b}}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      10. associate-*r/N/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \color{blue}{\frac{\frac{2}{3} \cdot 1}{a}}\right) \]
                                      11. metadata-evalN/A

                                        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{\color{blue}{\frac{2}{3}}}{a}\right) \]
                                      12. lower-/.f6435.9

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

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

                                      \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{c}{b}} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites10.8%

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

                                      Reproduce

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