Quadratic roots, narrow range

Percentage Accurate: 55.2% → 99.5%
Time: 14.3s
Alternatives: 11
Speedup: 29.0×

Specification

?
\[\left(\left(1.0536712127723509 \cdot 10^{-8} < a \land a < 94906265.62425156\right) \land \left(1.0536712127723509 \cdot 10^{-8} < b \land b < 94906265.62425156\right)\right) \land \left(1.0536712127723509 \cdot 10^{-8} < c \land c < 94906265.62425156\right)\]
\[\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 11 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: 55.2% 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: 99.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \frac{2 \cdot c}{\left(-b\right) - \sqrt{\mathsf{fma}\left(-4, c \cdot a, {b}^{2}\right)}} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (* 2.0 c) (- (- b) (sqrt (fma -4.0 (* c a) (pow b 2.0))))))
double code(double a, double b, double c) {
	return (2.0 * c) / (-b - sqrt(fma(-4.0, (c * a), pow(b, 2.0))));
}
function code(a, b, c)
	return Float64(Float64(2.0 * c) / Float64(Float64(-b) - sqrt(fma(-4.0, Float64(c * a), (b ^ 2.0)))))
end
code[a_, b_, c_] := N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - N[Sqrt[N[(-4.0 * N[(c * a), $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2 \cdot c}{\left(-b\right) - \sqrt{\mathsf{fma}\left(-4, c \cdot a, {b}^{2}\right)}}
\end{array}
Derivation
  1. Initial program 55.8%

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

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. neg-sub055.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\left(\color{blue}{0} \cdot b\right) \cdot \left(\left(-b\right) - b\right) + c \cdot \left(4 \cdot a\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(4 \cdot a\right)}}}{a \cdot 2} \]
    9. mul0-lft99.4%

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

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

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

    \[\leadsto \frac{\color{blue}{\frac{0 \cdot \left(\left(-b\right) - b\right) + c \cdot \left(a \cdot 4\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}}{a \cdot 2} \]
  13. Step-by-step derivation
    1. div-inv99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.5 \cdot \frac{\color{blue}{c \cdot \left(a \cdot 4\right) + 0}}{a}}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}} \]
    10. +-rgt-identity99.6%

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

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

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

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

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

      \[\leadsto \frac{0.5 \cdot \frac{4 \cdot \left(c \cdot a\right)}{a}}{\left(-b\right) - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}} \]
    16. cancel-sign-sub-inv99.6%

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

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

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

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

Alternative 2: 90.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a} \leq -2.6:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(-4 \cdot a\right)\right)} - b}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{\frac{-0.5 \cdot \frac{b}{c} + a \cdot \left(0.5 \cdot \frac{c \cdot a}{{b}^{3}} + 0.5 \cdot \frac{1}{b}\right)}{a}}}{2 \cdot a}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= (/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* 2.0 a)) -2.6)
   (/ (- (sqrt (fma b b (* c (* -4.0 a)))) b) (* 2.0 a))
   (/
    (/
     1.0
     (/
      (+
       (* -0.5 (/ b c))
       (* a (+ (* 0.5 (/ (* c a) (pow b 3.0))) (* 0.5 (/ 1.0 b)))))
      a))
    (* 2.0 a))))
double code(double a, double b, double c) {
	double tmp;
	if (((sqrt(((b * b) - (c * (a * 4.0)))) - b) / (2.0 * a)) <= -2.6) {
		tmp = (sqrt(fma(b, b, (c * (-4.0 * a)))) - b) / (2.0 * a);
	} else {
		tmp = (1.0 / (((-0.5 * (b / c)) + (a * ((0.5 * ((c * a) / pow(b, 3.0))) + (0.5 * (1.0 / b))))) / a)) / (2.0 * a);
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(2.0 * a)) <= -2.6)
		tmp = Float64(Float64(sqrt(fma(b, b, Float64(c * Float64(-4.0 * a)))) - b) / Float64(2.0 * a));
	else
		tmp = Float64(Float64(1.0 / Float64(Float64(Float64(-0.5 * Float64(b / c)) + Float64(a * Float64(Float64(0.5 * Float64(Float64(c * a) / (b ^ 3.0))) + Float64(0.5 * Float64(1.0 / b))))) / a)) / Float64(2.0 * a));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision], -2.6], N[(N[(N[Sqrt[N[(b * b + N[(c * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(N[(N[(-0.5 * N[(b / c), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[(0.5 * N[(N[(c * a), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a} \leq -2.6:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(-4 \cdot a\right)\right)} - b}{2 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\frac{-0.5 \cdot \frac{b}{c} + a \cdot \left(0.5 \cdot \frac{c \cdot a}{{b}^{3}} + 0.5 \cdot \frac{1}{b}\right)}{a}}}{2 \cdot a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a)) < -2.60000000000000009

    1. Initial program 86.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. *-commutative86.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.60000000000000009 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a))

    1. Initial program 52.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. *-commutative52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\left(\color{blue}{0} \cdot b\right) \cdot \left(\left(-b\right) - b\right) + c \cdot \left(4 \cdot a\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(4 \cdot a\right)}}}{a \cdot 2} \]
      9. mul0-lft99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{1}{\frac{\left(-b\right) - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}}{\mathsf{fma}\left(c, a \cdot 4, 0\right)}}}{a \cdot 2} \]
      5. cancel-sign-sub-inv99.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{1}{\color{blue}{\frac{-0.5 \cdot \frac{b}{c} + a \cdot \left(0.5 \cdot \frac{a \cdot c}{{b}^{3}} + 0.5 \cdot \frac{1}{b}\right)}{a}}}}{a \cdot 2} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a} \leq -2.6:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(-4 \cdot a\right)\right)} - b}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{\frac{-0.5 \cdot \frac{b}{c} + a \cdot \left(0.5 \cdot \frac{c \cdot a}{{b}^{3}} + 0.5 \cdot \frac{1}{b}\right)}{a}}}{2 \cdot a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\
\mathbf{if}\;t\_0 \leq -2.6:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\frac{-0.5 \cdot \frac{b}{c} + a \cdot \left(0.5 \cdot \frac{c \cdot a}{{b}^{3}} + 0.5 \cdot \frac{1}{b}\right)}{a}}}{2 \cdot a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a)) < -2.60000000000000009

    1. Initial program 86.3%

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

    if -2.60000000000000009 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a))

    1. Initial program 52.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. *-commutative52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\left(\color{blue}{0} \cdot b\right) \cdot \left(\left(-b\right) - b\right) + c \cdot \left(4 \cdot a\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(4 \cdot a\right)}}}{a \cdot 2} \]
      9. mul0-lft99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{1}{\frac{\left(-b\right) - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}}{\mathsf{fma}\left(c, a \cdot 4, 0\right)}}}{a \cdot 2} \]
      5. cancel-sign-sub-inv99.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{1}{\color{blue}{\frac{-0.5 \cdot \frac{b}{c} + a \cdot \left(0.5 \cdot \frac{a \cdot c}{{b}^{3}} + 0.5 \cdot \frac{1}{b}\right)}{a}}}}{a \cdot 2} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.0%

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

Alternative 4: 90.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\
\mathbf{if}\;t\_0 \leq -2.6:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\frac{-0.5 \cdot \frac{b}{a} + c \cdot \left(0.5 \cdot \frac{c \cdot a}{{b}^{3}} + 0.5 \cdot \frac{1}{b}\right)}{c}}}{2 \cdot a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a)) < -2.60000000000000009

    1. Initial program 86.3%

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

    if -2.60000000000000009 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a))

    1. Initial program 52.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. *-commutative52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\left(\color{blue}{0} \cdot b\right) \cdot \left(\left(-b\right) - b\right) + c \cdot \left(4 \cdot a\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(4 \cdot a\right)}}}{a \cdot 2} \]
      9. mul0-lft99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{1}{\frac{\left(-b\right) - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}}{\mathsf{fma}\left(c, a \cdot 4, 0\right)}}}{a \cdot 2} \]
      5. cancel-sign-sub-inv99.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{1}{\color{blue}{\frac{-0.5 \cdot \frac{b}{a} + c \cdot \left(0.5 \cdot \frac{a \cdot c}{{b}^{3}} + 0.5 \cdot \frac{1}{b}\right)}{c}}}}{a \cdot 2} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.0%

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

Alternative 5: 86.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\
\mathbf{if}\;t\_0 \leq -0.1:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot \frac{\left(c \cdot a\right) \cdot 4}{a}}{2 \cdot \frac{c \cdot a}{b} - 2 \cdot b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a)) < -0.10000000000000001

    1. Initial program 82.6%

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

    if -0.10000000000000001 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a))

    1. Initial program 50.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. *-commutative50.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\left(\color{blue}{0} \cdot b\right) \cdot \left(\left(-b\right) - b\right) + c \cdot \left(4 \cdot a\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(4 \cdot a\right)}}}{a \cdot 2} \]
      9. mul0-lft99.4%

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{0 \cdot \left(\left(-b\right) - b\right) + c \cdot \left(a \cdot 4\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}}{a \cdot 2} \]
    13. Step-by-step derivation
      1. div-inv99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.5 \cdot \frac{\color{blue}{c \cdot \left(a \cdot 4\right) + 0}}{a}}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}} \]
      10. +-rgt-identity99.6%

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

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

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

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

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

        \[\leadsto \frac{0.5 \cdot \frac{4 \cdot \left(c \cdot a\right)}{a}}{\left(-b\right) - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}} \]
      16. cancel-sign-sub-inv99.6%

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

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

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

      \[\leadsto \frac{0.5 \cdot \frac{4 \cdot \left(c \cdot a\right)}{a}}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a} \leq -0.1:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5 \cdot \frac{\left(c \cdot a\right) \cdot 4}{a}}{2 \cdot \frac{c \cdot a}{b} - 2 \cdot b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 99.5% accurate, 0.5× speedup?

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

\\
\frac{0.5 \cdot \frac{4 \cdot \left(c \cdot \left(-a\right)\right)}{a}}{b + \sqrt{{b}^{2} + -4 \cdot \left(c \cdot a\right)}}
\end{array}
Derivation
  1. Initial program 55.8%

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

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. neg-sub055.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\left(\color{blue}{0} \cdot b\right) \cdot \left(\left(-b\right) - b\right) + c \cdot \left(4 \cdot a\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(4 \cdot a\right)}}}{a \cdot 2} \]
    9. mul0-lft99.4%

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

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

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

    \[\leadsto \frac{\color{blue}{\frac{0 \cdot \left(\left(-b\right) - b\right) + c \cdot \left(a \cdot 4\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}}{a \cdot 2} \]
  13. Step-by-step derivation
    1. div-inv99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.5 \cdot \frac{\color{blue}{c \cdot \left(a \cdot 4\right) + 0}}{a}}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}} \]
    10. +-rgt-identity99.6%

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

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

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

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

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

      \[\leadsto \frac{0.5 \cdot \frac{4 \cdot \left(c \cdot a\right)}{a}}{\left(-b\right) - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}} \]
    16. cancel-sign-sub-inv99.6%

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

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

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

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

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

    \[\leadsto \frac{0.5 \cdot \frac{4 \cdot \left(c \cdot \left(-a\right)\right)}{a}}{b + \sqrt{{b}^{2} + -4 \cdot \left(c \cdot a\right)}} \]
  20. Add Preprocessing

Alternative 7: 82.5% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \frac{0.5 \cdot \frac{\left(c \cdot a\right) \cdot 4}{a}}{2 \cdot \frac{c \cdot a}{b} - 2 \cdot b} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (* 0.5 (/ (* (* c a) 4.0) a)) (- (* 2.0 (/ (* c a) b)) (* 2.0 b))))
double code(double a, double b, double c) {
	return (0.5 * (((c * a) * 4.0) / a)) / ((2.0 * ((c * a) / b)) - (2.0 * b));
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (0.5d0 * (((c * a) * 4.0d0) / a)) / ((2.0d0 * ((c * a) / b)) - (2.0d0 * b))
end function
public static double code(double a, double b, double c) {
	return (0.5 * (((c * a) * 4.0) / a)) / ((2.0 * ((c * a) / b)) - (2.0 * b));
}
def code(a, b, c):
	return (0.5 * (((c * a) * 4.0) / a)) / ((2.0 * ((c * a) / b)) - (2.0 * b))
function code(a, b, c)
	return Float64(Float64(0.5 * Float64(Float64(Float64(c * a) * 4.0) / a)) / Float64(Float64(2.0 * Float64(Float64(c * a) / b)) - Float64(2.0 * b)))
end
function tmp = code(a, b, c)
	tmp = (0.5 * (((c * a) * 4.0) / a)) / ((2.0 * ((c * a) / b)) - (2.0 * b));
end
code[a_, b_, c_] := N[(N[(0.5 * N[(N[(N[(c * a), $MachinePrecision] * 4.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / N[(N[(2.0 * N[(N[(c * a), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] - N[(2.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{0.5 \cdot \frac{\left(c \cdot a\right) \cdot 4}{a}}{2 \cdot \frac{c \cdot a}{b} - 2 \cdot b}
\end{array}
Derivation
  1. Initial program 55.8%

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

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. neg-sub055.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\left(\color{blue}{0} \cdot b\right) \cdot \left(\left(-b\right) - b\right) + c \cdot \left(4 \cdot a\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(4 \cdot a\right)}}}{a \cdot 2} \]
    9. mul0-lft99.4%

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

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

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

    \[\leadsto \frac{\color{blue}{\frac{0 \cdot \left(\left(-b\right) - b\right) + c \cdot \left(a \cdot 4\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}}{a \cdot 2} \]
  13. Step-by-step derivation
    1. div-inv99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.5 \cdot \frac{\color{blue}{c \cdot \left(a \cdot 4\right) + 0}}{a}}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}} \]
    10. +-rgt-identity99.6%

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

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

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

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

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

      \[\leadsto \frac{0.5 \cdot \frac{4 \cdot \left(c \cdot a\right)}{a}}{\left(-b\right) - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}} \]
    16. cancel-sign-sub-inv99.6%

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

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

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

    \[\leadsto \frac{0.5 \cdot \frac{4 \cdot \left(c \cdot a\right)}{a}}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}} \]
  18. Final simplification82.5%

    \[\leadsto \frac{0.5 \cdot \frac{\left(c \cdot a\right) \cdot 4}{a}}{2 \cdot \frac{c \cdot a}{b} - 2 \cdot b} \]
  19. Add Preprocessing

Alternative 8: 82.3% accurate, 6.1× speedup?

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

\\
\frac{\frac{\left(c \cdot a\right) \cdot 4}{2 \cdot \left(\frac{c \cdot a}{b} - b\right)}}{2 \cdot a}
\end{array}
Derivation
  1. Initial program 55.8%

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

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. neg-sub055.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\left(\color{blue}{0} \cdot b\right) \cdot \left(\left(-b\right) - b\right) + c \cdot \left(4 \cdot a\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(4 \cdot a\right)}}}{a \cdot 2} \]
    9. mul0-lft99.4%

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

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

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

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

    \[\leadsto \frac{\frac{0 \cdot \left(\left(-b\right) - b\right) + c \cdot \left(a \cdot 4\right)}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}}{a \cdot 2} \]
  14. Step-by-step derivation
    1. distribute-lft-out--82.4%

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

      \[\leadsto \frac{\frac{0 \cdot \left(\left(-b\right) - b\right) + c \cdot \left(a \cdot 4\right)}{2 \cdot \left(\frac{\color{blue}{c \cdot a}}{b} - b\right)}}{a \cdot 2} \]
  15. Simplified82.4%

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

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

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

    \[\leadsto \frac{\frac{\color{blue}{4 \cdot \left(c \cdot a\right)}}{2 \cdot \left(\frac{c \cdot a}{b} - b\right)}}{a \cdot 2} \]
  19. Final simplification82.4%

    \[\leadsto \frac{\frac{\left(c \cdot a\right) \cdot 4}{2 \cdot \left(\frac{c \cdot a}{b} - b\right)}}{2 \cdot a} \]
  20. Add Preprocessing

Alternative 9: 82.3% accurate, 6.1× speedup?

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

\\
\frac{\frac{1}{\frac{-0.5 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}}{c}}}{2 \cdot a}
\end{array}
Derivation
  1. Initial program 55.8%

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

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. neg-sub055.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\left(\color{blue}{0} \cdot b\right) \cdot \left(\left(-b\right) - b\right) + c \cdot \left(4 \cdot a\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(4 \cdot a\right)}}}{a \cdot 2} \]
    9. mul0-lft99.4%

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

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

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

    \[\leadsto \frac{\color{blue}{\frac{0 \cdot \left(\left(-b\right) - b\right) + c \cdot \left(a \cdot 4\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}}{a \cdot 2} \]
  13. Step-by-step derivation
    1. clear-num99.2%

      \[\leadsto \frac{\color{blue}{\frac{1}{\frac{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}{0 \cdot \left(\left(-b\right) - b\right) + c \cdot \left(a \cdot 4\right)}}}}{a \cdot 2} \]
    2. inv-pow99.2%

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

      \[\leadsto \frac{{\left(\frac{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}{\color{blue}{c \cdot \left(a \cdot 4\right) + 0 \cdot \left(\left(-b\right) - b\right)}}\right)}^{-1}}{a \cdot 2} \]
    4. mul0-lft99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\frac{1}{\color{blue}{\frac{-0.5 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}}{c}}}}{a \cdot 2} \]
  18. Final simplification82.3%

    \[\leadsto \frac{\frac{1}{\frac{-0.5 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}}{c}}}{2 \cdot a} \]
  19. Add Preprocessing

Alternative 10: 64.6% accurate, 29.0× speedup?

\[\begin{array}{l} \\ \frac{c}{-b} \end{array} \]
(FPCore (a b c) :precision binary64 (/ c (- b)))
double code(double a, double b, double c) {
	return c / -b;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = c / -b
end function
public static double code(double a, double b, double c) {
	return c / -b;
}
def code(a, b, c):
	return c / -b
function code(a, b, c)
	return Float64(c / Float64(-b))
end
function tmp = code(a, b, c)
	tmp = c / -b;
end
code[a_, b_, c_] := N[(c / (-b)), $MachinePrecision]
\begin{array}{l}

\\
\frac{c}{-b}
\end{array}
Derivation
  1. Initial program 55.8%

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{-c}}{b} \]
  7. Simplified64.4%

    \[\leadsto \color{blue}{\frac{-c}{b}} \]
  8. Final simplification64.4%

    \[\leadsto \frac{c}{-b} \]
  9. Add Preprocessing

Alternative 11: 3.2% accurate, 116.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (a b c) :precision binary64 0.0)
double code(double a, double b, double c) {
	return 0.0;
}
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
end function
public static double code(double a, double b, double c) {
	return 0.0;
}
def code(a, b, c):
	return 0.0
function code(a, b, c)
	return 0.0
end
function tmp = code(a, b, c)
	tmp = 0.0;
end
code[a_, b_, c_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 55.8%

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

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. neg-sub055.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{0}}{a} \]
  11. Simplified3.2%

    \[\leadsto \color{blue}{\frac{0}{a}} \]
  12. Taylor expanded in a around 0 3.2%

    \[\leadsto \color{blue}{0} \]
  13. Add Preprocessing

Reproduce

?
herbie shell --seed 2024123 
(FPCore (a b c)
  :name "Quadratic roots, narrow range"
  :precision binary64
  :pre (and (and (and (< 1.0536712127723509e-8 a) (< a 94906265.62425156)) (and (< 1.0536712127723509e-8 b) (< b 94906265.62425156))) (and (< 1.0536712127723509e-8 c) (< c 94906265.62425156)))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))