The quadratic formula (r1)

Percentage Accurate: 51.6% → 85.7%
Time: 15.8s
Alternatives: 9
Speedup: 19.1×

Specification

?
\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.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) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \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 9 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: 51.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.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) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 85.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+155}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-70}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -2e+155)
   (- (/ c b) (/ b a))
   (if (<= b 5.2e-70)
     (/ (- (sqrt (fma b b (* c (* a -4.0)))) b) (* a 2.0))
     (/ (- c) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -2e+155) {
		tmp = (c / b) - (b / a);
	} else if (b <= 5.2e-70) {
		tmp = (sqrt(fma(b, b, (c * (a * -4.0)))) - b) / (a * 2.0);
	} else {
		tmp = -c / b;
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -2e+155)
		tmp = Float64(Float64(c / b) - Float64(b / a));
	elseif (b <= 5.2e-70)
		tmp = Float64(Float64(sqrt(fma(b, b, Float64(c * Float64(a * -4.0)))) - b) / Float64(a * 2.0));
	else
		tmp = Float64(Float64(-c) / b);
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -2e+155], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.2e-70], N[(N[(N[Sqrt[N[(b * b + N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[((-c) / b), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 5.2 \cdot 10^{-70}:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}\\

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


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

    1. Initial program 33.5%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
    5. Step-by-step derivation
      1. +-commutative95.5%

        \[\leadsto \color{blue}{\frac{c}{b} + -1 \cdot \frac{b}{a}} \]
      2. mul-1-neg95.5%

        \[\leadsto \frac{c}{b} + \color{blue}{\left(-\frac{b}{a}\right)} \]
      3. unsub-neg95.5%

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

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

    if -2.00000000000000001e155 < b < 5.20000000000000004e-70

    1. Initial program 85.4%

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

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

      if 5.20000000000000004e-70 < b

      1. Initial program 18.4%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
      5. Step-by-step derivation
        1. mul-1-neg88.9%

          \[\leadsto \color{blue}{-\frac{c}{b}} \]
        2. distribute-neg-frac88.9%

          \[\leadsto \color{blue}{\frac{-c}{b}} \]
      6. Simplified88.9%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+155}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-70}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]

    Alternative 2: 85.7% accurate, 1.0× speedup?

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

      1. Initial program 33.5%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
      5. Step-by-step derivation
        1. +-commutative95.5%

          \[\leadsto \color{blue}{\frac{c}{b} + -1 \cdot \frac{b}{a}} \]
        2. mul-1-neg95.5%

          \[\leadsto \frac{c}{b} + \color{blue}{\left(-\frac{b}{a}\right)} \]
        3. unsub-neg95.5%

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

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

      if -1e153 < b < 1.1e-69

      1. Initial program 85.4%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]

      if 1.1e-69 < b

      1. Initial program 18.4%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
      5. Step-by-step derivation
        1. mul-1-neg88.9%

          \[\leadsto \color{blue}{-\frac{c}{b}} \]
        2. distribute-neg-frac88.9%

          \[\leadsto \color{blue}{\frac{-c}{b}} \]
      6. Simplified88.9%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+153}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{-69}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]

    Alternative 3: 80.9% accurate, 1.0× speedup?

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

      1. Initial program 70.3%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
      5. Step-by-step derivation
        1. +-commutative86.2%

          \[\leadsto \color{blue}{\frac{c}{b} + -1 \cdot \frac{b}{a}} \]
        2. mul-1-neg86.2%

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

          \[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}} \]
      6. Simplified86.2%

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

      if -5.09999999999999986e-76 < b < 1.5999999999999999e-70

      1. Initial program 76.7%

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

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

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

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

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

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

          \[\leadsto \frac{\left(-b\right) + \sqrt{\mathsf{fma}\left(\color{blue}{a \cdot -4}, c, {b}^{2}\right)}}{a \cdot 2} \]
      6. Simplified76.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}}}{a \cdot 2} \]
      7. Step-by-step derivation
        1. clear-num76.7%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\left(-b\right) + \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}}}} \]
        2. inv-pow76.7%

          \[\leadsto \color{blue}{{\left(\frac{a \cdot 2}{\left(-b\right) + \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}}\right)}^{-1}} \]
        3. neg-mul-176.7%

          \[\leadsto {\left(\frac{a \cdot 2}{\color{blue}{-1 \cdot b} + \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}}\right)}^{-1} \]
        4. fma-def76.7%

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

        \[\leadsto \color{blue}{{\left(\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}\right)}\right)}^{-1}} \]
      9. Step-by-step derivation
        1. unpow-176.7%

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

          \[\leadsto \frac{1}{\color{blue}{\frac{a}{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}\right)}{2}}}} \]
      10. Simplified76.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}\right)}{2}}}} \]
      11. Step-by-step derivation
        1. *-un-lft-identity76.7%

          \[\leadsto \frac{1}{\frac{\color{blue}{1 \cdot a}}{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}\right)}{2}}} \]
        2. div-inv76.7%

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

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

          \[\leadsto \frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}\right)} \cdot \frac{a}{0.5}}} \]
        5. *-un-lft-identity76.4%

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

          \[\leadsto \frac{1}{\frac{1}{\mathsf{fma}\left(-1, b, \sqrt{1 \cdot \color{blue}{\left(\left(a \cdot -4\right) \cdot c + {b}^{2}\right)}}\right)} \cdot \frac{a}{0.5}} \]
        7. *-un-lft-identity76.4%

          \[\leadsto \frac{1}{\frac{1}{\mathsf{fma}\left(-1, b, \sqrt{\color{blue}{\left(a \cdot -4\right) \cdot c + {b}^{2}}}\right)} \cdot \frac{a}{0.5}} \]
        8. associate-*r*76.4%

          \[\leadsto \frac{1}{\frac{1}{\mathsf{fma}\left(-1, b, \sqrt{\color{blue}{a \cdot \left(-4 \cdot c\right)} + {b}^{2}}\right)} \cdot \frac{a}{0.5}} \]
        9. fma-udef76.4%

          \[\leadsto \frac{1}{\frac{1}{\mathsf{fma}\left(-1, b, \sqrt{\color{blue}{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}}\right)} \cdot \frac{a}{0.5}} \]
      12. Applied egg-rr76.4%

        \[\leadsto \frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}\right)} \cdot \frac{a}{0.5}}} \]
      13. Step-by-step derivation
        1. associate-*l/76.7%

          \[\leadsto \frac{1}{\color{blue}{\frac{1 \cdot \frac{a}{0.5}}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}\right)}}} \]
        2. *-lft-identity76.7%

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

          \[\leadsto \frac{1}{\frac{\frac{a}{0.5}}{\color{blue}{-1 \cdot b + \sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}}}} \]
        4. neg-mul-176.7%

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

          \[\leadsto \frac{1}{\frac{\frac{a}{0.5}}{\color{blue}{\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)} + \left(-b\right)}}} \]
        6. sub-neg76.7%

          \[\leadsto \frac{1}{\frac{\frac{a}{0.5}}{\color{blue}{\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)} - b}}} \]
        7. *-commutative76.7%

          \[\leadsto \frac{1}{\frac{\frac{a}{0.5}}{\sqrt{\mathsf{fma}\left(a, \color{blue}{c \cdot -4}, {b}^{2}\right)} - b}} \]
      14. Simplified76.7%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{a}{0.5}}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b}}} \]
      15. Taylor expanded in a around inf 70.2%

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

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

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

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

      if 1.5999999999999999e-70 < b

      1. Initial program 18.4%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
      5. Step-by-step derivation
        1. mul-1-neg88.9%

          \[\leadsto \color{blue}{-\frac{c}{b}} \]
        2. distribute-neg-frac88.9%

          \[\leadsto \color{blue}{\frac{-c}{b}} \]
      6. Simplified88.9%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.1 \cdot 10^{-76}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{-70}:\\ \;\;\;\;\frac{1}{\frac{\frac{a}{0.5}}{\sqrt{a \cdot \left(c \cdot -4\right)} - b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]

    Alternative 4: 80.9% accurate, 1.0× speedup?

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

      1. Initial program 70.3%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
      5. Step-by-step derivation
        1. +-commutative86.2%

          \[\leadsto \color{blue}{\frac{c}{b} + -1 \cdot \frac{b}{a}} \]
        2. mul-1-neg86.2%

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

          \[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}} \]
      6. Simplified86.2%

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

      if -1.4500000000000001e-76 < b < 3.7e-70

      1. Initial program 76.7%

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

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

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

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

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

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

          \[\leadsto \frac{\left(-b\right) + \sqrt{\mathsf{fma}\left(\color{blue}{a \cdot -4}, c, {b}^{2}\right)}}{a \cdot 2} \]
      6. Simplified76.7%

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

          \[\leadsto \frac{\color{blue}{\sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)} + \left(-b\right)}}{a \cdot 2} \]
        2. *-un-lft-identity76.7%

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(1, \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}, -b\right)}}{a \cdot 2} \]
      9. Step-by-step derivation
        1. fma-udef76.7%

          \[\leadsto \frac{\color{blue}{1 \cdot \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)} + \left(-b\right)}}{a \cdot 2} \]
        2. *-lft-identity76.7%

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

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

          \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot -4\right) \cdot c + {b}^{2}}} - b}{a \cdot 2} \]
        5. associate-*l*76.7%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)} - b}}{a \cdot 2} \]
      11. Step-by-step derivation
        1. div-sub76.6%

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

          \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}}{a \cdot 2} + \left(-\frac{b}{a \cdot 2}\right)} \]
        3. *-un-lft-identity76.6%

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

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

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

          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}}{a \cdot 2} + \left(-\color{blue}{0.5} \cdot \frac{b}{a}\right) \]
      12. Applied egg-rr76.6%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}}{a \cdot 2} + \left(-0.5 \cdot \frac{b}{a}\right)} \]
      13. Step-by-step derivation
        1. sub-neg76.6%

          \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}}{a \cdot 2} - 0.5 \cdot \frac{b}{a}} \]
        2. *-commutative76.6%

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

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

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

          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}}{a \cdot 2} - \frac{\color{blue}{b}}{a \cdot 2} \]
        6. div-sub76.7%

          \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)} - b}{a \cdot 2}} \]
        7. *-lft-identity76.7%

          \[\leadsto \frac{\color{blue}{1 \cdot \left(\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)} - b\right)}}{a \cdot 2} \]
        8. *-lft-identity76.7%

          \[\leadsto \frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)} - b}}{a \cdot 2} \]
        9. sub-neg76.7%

          \[\leadsto \frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)} + \left(-b\right)}}{a \cdot 2} \]
        10. +-commutative76.7%

          \[\leadsto \frac{\color{blue}{\left(-b\right) + \sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}}}{a \cdot 2} \]
        11. neg-mul-176.7%

          \[\leadsto \frac{\color{blue}{-1 \cdot b} + \sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}}{a \cdot 2} \]
        12. fma-udef76.7%

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}\right)}}{a \cdot 2} \]
        13. *-lft-identity76.7%

          \[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}\right)}}{a \cdot 2} \]
        14. *-commutative76.7%

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a, -4 \cdot c, {b}^{2}\right)}\right) \cdot 1}}{a \cdot 2} \]
        15. times-frac76.7%

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

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

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

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

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

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

      if 3.7e-70 < b

      1. Initial program 18.4%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
      5. Step-by-step derivation
        1. mul-1-neg88.9%

          \[\leadsto \color{blue}{-\frac{c}{b}} \]
        2. distribute-neg-frac88.9%

          \[\leadsto \color{blue}{\frac{-c}{b}} \]
      6. Simplified88.9%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.45 \cdot 10^{-76}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-70}:\\ \;\;\;\;\left(\sqrt{a \cdot \left(c \cdot -4\right)} - b\right) \cdot \frac{0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]

    Alternative 5: 80.9% accurate, 1.0× speedup?

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

      1. Initial program 70.3%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
      5. Step-by-step derivation
        1. +-commutative86.2%

          \[\leadsto \color{blue}{\frac{c}{b} + -1 \cdot \frac{b}{a}} \]
        2. mul-1-neg86.2%

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

          \[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}} \]
      6. Simplified86.2%

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

      if -7.99999999999999942e-76 < b < 1.0800000000000001e-69

      1. Initial program 76.7%

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

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

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

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

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

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

          \[\leadsto \frac{\left(-b\right) + \sqrt{\mathsf{fma}\left(\color{blue}{a \cdot -4}, c, {b}^{2}\right)}}{a \cdot 2} \]
      6. Simplified76.7%

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

          \[\leadsto \frac{\color{blue}{\sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)} + \left(-b\right)}}{a \cdot 2} \]
        2. *-un-lft-identity76.7%

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(1, \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}, -b\right)}}{a \cdot 2} \]
      9. Step-by-step derivation
        1. fma-udef76.7%

          \[\leadsto \frac{\color{blue}{1 \cdot \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)} + \left(-b\right)}}{a \cdot 2} \]
        2. *-lft-identity76.7%

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

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

          \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot -4\right) \cdot c + {b}^{2}}} - b}{a \cdot 2} \]
        5. associate-*l*76.7%

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

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

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

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

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

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

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

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

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

      if 1.0800000000000001e-69 < b

      1. Initial program 18.4%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
      5. Step-by-step derivation
        1. mul-1-neg88.9%

          \[\leadsto \color{blue}{-\frac{c}{b}} \]
        2. distribute-neg-frac88.9%

          \[\leadsto \color{blue}{\frac{-c}{b}} \]
      6. Simplified88.9%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8 \cdot 10^{-76}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq 1.08 \cdot 10^{-69}:\\ \;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]

    Alternative 6: 68.2% accurate, 12.8× speedup?

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

      1. Initial program 73.4%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
      5. Step-by-step derivation
        1. +-commutative66.4%

          \[\leadsto \color{blue}{\frac{c}{b} + -1 \cdot \frac{b}{a}} \]
        2. mul-1-neg66.4%

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

          \[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}} \]
      6. Simplified66.4%

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

      if -4.999999999999985e-310 < b

      1. Initial program 35.3%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
      5. Step-by-step derivation
        1. mul-1-neg66.9%

          \[\leadsto \color{blue}{-\frac{c}{b}} \]
        2. distribute-neg-frac66.9%

          \[\leadsto \color{blue}{\frac{-c}{b}} \]
      6. Simplified66.9%

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

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

    Alternative 7: 44.6% accurate, 19.1× speedup?

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

      1. Initial program 73.4%

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1 \cdot b}{a}} \]
        2. mul-1-neg67.8%

          \[\leadsto \frac{\color{blue}{-b}}{a} \]
      6. Simplified67.8%

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

      if -1.2e-303 < b

      1. Initial program 36.6%

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}}}{a \cdot 2} \]
      7. Step-by-step derivation
        1. clear-num36.6%

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

          \[\leadsto \color{blue}{{\left(\frac{a \cdot 2}{\left(-b\right) + \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}}\right)}^{-1}} \]
        3. neg-mul-136.6%

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

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

        \[\leadsto \color{blue}{{\left(\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}\right)}\right)}^{-1}} \]
      9. Step-by-step derivation
        1. unpow-136.6%

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

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

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

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

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

          \[\leadsto \frac{0.5 \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot b\right)}}{a} \]
        3. metadata-eval18.8%

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

          \[\leadsto \frac{0.5 \cdot \color{blue}{0}}{a} \]
        5. metadata-eval18.8%

          \[\leadsto \frac{\color{blue}{0}}{a} \]
      13. Simplified18.8%

        \[\leadsto \color{blue}{\frac{0}{a}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification42.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.2 \cdot 10^{-303}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{0}{a}\\ \end{array} \]

    Alternative 8: 68.0% accurate, 19.1× speedup?

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

      1. Initial program 73.3%

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1 \cdot b}{a}} \]
        2. mul-1-neg62.7%

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

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

      if 4.20000000000000005e-256 < b

      1. Initial program 33.2%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
      5. Step-by-step derivation
        1. mul-1-neg70.6%

          \[\leadsto \color{blue}{-\frac{c}{b}} \]
        2. distribute-neg-frac70.6%

          \[\leadsto \color{blue}{\frac{-c}{b}} \]
      6. Simplified70.6%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.2 \cdot 10^{-256}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]

    Alternative 9: 11.5% accurate, 38.7× speedup?

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}}}{a \cdot 2} \]
    7. Step-by-step derivation
      1. clear-num54.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\left(-b\right) + \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}}}} \]
      2. inv-pow54.5%

        \[\leadsto \color{blue}{{\left(\frac{a \cdot 2}{\left(-b\right) + \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}}\right)}^{-1}} \]
      3. neg-mul-154.5%

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

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

      \[\leadsto \color{blue}{{\left(\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(a \cdot -4, c, {b}^{2}\right)}\right)}\right)}^{-1}} \]
    9. Step-by-step derivation
      1. unpow-154.5%

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

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

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

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

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

        \[\leadsto \frac{0.5 \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot b\right)}}{a} \]
      3. metadata-eval10.9%

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

        \[\leadsto \frac{0.5 \cdot \color{blue}{0}}{a} \]
      5. metadata-eval10.9%

        \[\leadsto \frac{\color{blue}{0}}{a} \]
    13. Simplified10.9%

      \[\leadsto \color{blue}{\frac{0}{a}} \]
    14. Final simplification10.9%

      \[\leadsto \frac{0}{a} \]

    Developer target: 69.7% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\ \mathbf{if}\;b < 0:\\ \;\;\;\;\frac{\left(-b\right) + t_0}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{a \cdot \frac{\left(-b\right) - t_0}{2 \cdot a}}\\ \end{array} \end{array} \]
    (FPCore (a b c)
     :precision binary64
     (let* ((t_0 (sqrt (- (* b b) (* (* 4.0 a) c)))))
       (if (< b 0.0)
         (/ (+ (- b) t_0) (* 2.0 a))
         (/ c (* a (/ (- (- b) t_0) (* 2.0 a)))))))
    double code(double a, double b, double c) {
    	double t_0 = sqrt(((b * b) - ((4.0 * a) * c)));
    	double tmp;
    	if (b < 0.0) {
    		tmp = (-b + t_0) / (2.0 * a);
    	} else {
    		tmp = c / (a * ((-b - t_0) / (2.0 * a)));
    	}
    	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) :: t_0
        real(8) :: tmp
        t_0 = sqrt(((b * b) - ((4.0d0 * a) * c)))
        if (b < 0.0d0) then
            tmp = (-b + t_0) / (2.0d0 * a)
        else
            tmp = c / (a * ((-b - t_0) / (2.0d0 * a)))
        end if
        code = tmp
    end function
    
    public static double code(double a, double b, double c) {
    	double t_0 = Math.sqrt(((b * b) - ((4.0 * a) * c)));
    	double tmp;
    	if (b < 0.0) {
    		tmp = (-b + t_0) / (2.0 * a);
    	} else {
    		tmp = c / (a * ((-b - t_0) / (2.0 * a)));
    	}
    	return tmp;
    }
    
    def code(a, b, c):
    	t_0 = math.sqrt(((b * b) - ((4.0 * a) * c)))
    	tmp = 0
    	if b < 0.0:
    		tmp = (-b + t_0) / (2.0 * a)
    	else:
    		tmp = c / (a * ((-b - t_0) / (2.0 * a)))
    	return tmp
    
    function code(a, b, c)
    	t_0 = sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))
    	tmp = 0.0
    	if (b < 0.0)
    		tmp = Float64(Float64(Float64(-b) + t_0) / Float64(2.0 * a));
    	else
    		tmp = Float64(c / Float64(a * Float64(Float64(Float64(-b) - t_0) / Float64(2.0 * a))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, c)
    	t_0 = sqrt(((b * b) - ((4.0 * a) * c)));
    	tmp = 0.0;
    	if (b < 0.0)
    		tmp = (-b + t_0) / (2.0 * a);
    	else
    		tmp = c / (a * ((-b - t_0) / (2.0 * a)));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Less[b, 0.0], N[(N[((-b) + t$95$0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision], N[(c / N[(a * N[(N[((-b) - t$95$0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\
    \mathbf{if}\;b < 0:\\
    \;\;\;\;\frac{\left(-b\right) + t_0}{2 \cdot a}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{c}{a \cdot \frac{\left(-b\right) - t_0}{2 \cdot a}}\\
    
    
    \end{array}
    \end{array}
    

    Reproduce

    ?
    herbie shell --seed 2023314 
    (FPCore (a b c)
      :name "The quadratic formula (r1)"
      :precision binary64
    
      :herbie-target
      (if (< b 0.0) (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)) (/ c (* a (/ (- (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))))
    
      (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))