| Alternative 1 | |
|---|---|
| Accuracy | 90.4% |
| Cost | 7564 |
(FPCore (a b_2 c) :precision binary64 (/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))
(FPCore (a b_2 c)
:precision binary64
(let* ((t_0 (sqrt (- (* b_2 b_2) (* c a)))))
(if (<= b_2 -2e+148)
(/ c (fma b_2 -2.0 (* (/ c b_2) (* a 0.5))))
(if (<= b_2 7.2e-152)
(/ c (- t_0 b_2))
(if (<= b_2 5e+117)
(- (/ (- t_0) a) (/ b_2 a))
(+ (* -2.0 (/ b_2 a)) (* (/ c b_2) 0.5)))))))double code(double a, double b_2, double c) {
return (-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a;
}
double code(double a, double b_2, double c) {
double t_0 = sqrt(((b_2 * b_2) - (c * a)));
double tmp;
if (b_2 <= -2e+148) {
tmp = c / fma(b_2, -2.0, ((c / b_2) * (a * 0.5)));
} else if (b_2 <= 7.2e-152) {
tmp = c / (t_0 - b_2);
} else if (b_2 <= 5e+117) {
tmp = (-t_0 / a) - (b_2 / a);
} else {
tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5);
}
return tmp;
}
function code(a, b_2, c) return Float64(Float64(Float64(-b_2) - sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c)))) / a) end
function code(a, b_2, c) t_0 = sqrt(Float64(Float64(b_2 * b_2) - Float64(c * a))) tmp = 0.0 if (b_2 <= -2e+148) tmp = Float64(c / fma(b_2, -2.0, Float64(Float64(c / b_2) * Float64(a * 0.5)))); elseif (b_2 <= 7.2e-152) tmp = Float64(c / Float64(t_0 - b_2)); elseif (b_2 <= 5e+117) tmp = Float64(Float64(Float64(-t_0) / a) - Float64(b_2 / a)); else tmp = Float64(Float64(-2.0 * Float64(b_2 / a)) + Float64(Float64(c / b_2) * 0.5)); end return tmp end
code[a_, b$95$2_, c_] := N[(N[((-b$95$2) - N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
code[a_, b$95$2_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$2, -2e+148], N[(c / N[(b$95$2 * -2.0 + N[(N[(c / b$95$2), $MachinePrecision] * N[(a * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 7.2e-152], N[(c / N[(t$95$0 - b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 5e+117], N[(N[((-t$95$0) / a), $MachinePrecision] - N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision] + N[(N[(c / b$95$2), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]]]]]
\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\begin{array}{l}
t_0 := \sqrt{b_2 \cdot b_2 - c \cdot a}\\
\mathbf{if}\;b_2 \leq -2 \cdot 10^{+148}:\\
\;\;\;\;\frac{c}{\mathsf{fma}\left(b_2, -2, \frac{c}{b_2} \cdot \left(a \cdot 0.5\right)\right)}\\
\mathbf{elif}\;b_2 \leq 7.2 \cdot 10^{-152}:\\
\;\;\;\;\frac{c}{t_0 - b_2}\\
\mathbf{elif}\;b_2 \leq 5 \cdot 10^{+117}:\\
\;\;\;\;\frac{-t_0}{a} - \frac{b_2}{a}\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{b_2}{a} + \frac{c}{b_2} \cdot 0.5\\
\end{array}
if b_2 < -2.0000000000000001e148Initial program 0.9%
Applied egg-rr0.9%
[Start]0.9 | \[ \frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
|---|---|
frac-2neg [=>]0.9 | \[ \color{blue}{\frac{-\left(\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)}{-a}}
\] |
div-inv [=>]0.9 | \[ \color{blue}{\left(-\left(\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}}
\] |
neg-sub0 [=>]0.9 | \[ \color{blue}{\left(0 - \left(\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right)} \cdot \frac{1}{-a}
\] |
add-sqr-sqrt [=>]0.6 | \[ \left(0 - \left(\color{blue}{\sqrt{-b_2} \cdot \sqrt{-b_2}} - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}
\] |
sqrt-unprod [=>]0.9 | \[ \left(0 - \left(\color{blue}{\sqrt{\left(-b_2\right) \cdot \left(-b_2\right)}} - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}
\] |
sqr-neg [=>]0.9 | \[ \left(0 - \left(\sqrt{\color{blue}{b_2 \cdot b_2}} - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}
\] |
sqrt-prod [=>]0.0 | \[ \left(0 - \left(\color{blue}{\sqrt{b_2} \cdot \sqrt{b_2}} - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}
\] |
add-sqr-sqrt [<=]0.1 | \[ \left(0 - \left(\color{blue}{b_2} - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}
\] |
associate-+l- [<=]0.1 | \[ \color{blue}{\left(\left(0 - b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}\right)} \cdot \frac{1}{-a}
\] |
neg-sub0 [<=]0.1 | \[ \left(\color{blue}{\left(-b_2\right)} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
add-sqr-sqrt [=>]0.1 | \[ \left(\color{blue}{\sqrt{-b_2} \cdot \sqrt{-b_2}} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
sqrt-unprod [=>]0.1 | \[ \left(\color{blue}{\sqrt{\left(-b_2\right) \cdot \left(-b_2\right)}} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
sqr-neg [=>]0.1 | \[ \left(\sqrt{\color{blue}{b_2 \cdot b_2}} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
sqrt-prod [=>]0.0 | \[ \left(\color{blue}{\sqrt{b_2} \cdot \sqrt{b_2}} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
add-sqr-sqrt [<=]0.9 | \[ \left(\color{blue}{b_2} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
neg-mul-1 [=>]0.9 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{\color{blue}{-1 \cdot a}}
\] |
associate-/r* [=>]0.9 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \color{blue}{\frac{\frac{1}{-1}}{a}}
\] |
metadata-eval [=>]0.9 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{\color{blue}{-1}}{a}
\] |
Simplified0.9%
[Start]0.9 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{-1}{a}
\] |
|---|---|
*-commutative [=>]0.9 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - \color{blue}{c \cdot a}}\right) \cdot \frac{-1}{a}
\] |
Applied egg-rr0.9%
[Start]0.9 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right) \cdot \frac{-1}{a}
\] |
|---|---|
frac-2neg [=>]0.9 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right) \cdot \color{blue}{\frac{--1}{-a}}
\] |
metadata-eval [=>]0.9 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right) \cdot \frac{\color{blue}{1}}{-a}
\] |
un-div-inv [=>]0.9 | \[ \color{blue}{\frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{-a}}
\] |
+-commutative [=>]0.9 | \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - c \cdot a} + b_2}}{-a}
\] |
flip-+ [=>]0.9 | \[ \frac{\color{blue}{\frac{\sqrt{b_2 \cdot b_2 - c \cdot a} \cdot \sqrt{b_2 \cdot b_2 - c \cdot a} - b_2 \cdot b_2}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}}}{-a}
\] |
associate-/l/ [=>]0.9 | \[ \color{blue}{\frac{\sqrt{b_2 \cdot b_2 - c \cdot a} \cdot \sqrt{b_2 \cdot b_2 - c \cdot a} - b_2 \cdot b_2}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}}
\] |
add-sqr-sqrt [<=]0.9 | \[ \frac{\color{blue}{\left(b_2 \cdot b_2 - c \cdot a\right)} - b_2 \cdot b_2}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}
\] |
associate--l- [=>]0.9 | \[ \frac{\color{blue}{b_2 \cdot b_2 - \left(c \cdot a + b_2 \cdot b_2\right)}}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}
\] |
+-commutative [<=]0.9 | \[ \frac{b_2 \cdot b_2 - \color{blue}{\left(b_2 \cdot b_2 + c \cdot a\right)}}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}
\] |
fma-def [=>]0.9 | \[ \frac{b_2 \cdot b_2 - \color{blue}{\mathsf{fma}\left(b_2, b_2, c \cdot a\right)}}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}
\] |
Simplified39.7%
[Start]0.9 | \[ \frac{b_2 \cdot b_2 - \mathsf{fma}\left(b_2, b_2, c \cdot a\right)}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}
\] |
|---|---|
associate-/r* [=>]0.9 | \[ \color{blue}{\frac{\frac{b_2 \cdot b_2 - \mathsf{fma}\left(b_2, b_2, c \cdot a\right)}{-a}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}}
\] |
fma-udef [=>]0.9 | \[ \frac{\frac{b_2 \cdot b_2 - \color{blue}{\left(b_2 \cdot b_2 + c \cdot a\right)}}{-a}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}
\] |
associate--r+ [=>]2.5 | \[ \frac{\frac{\color{blue}{\left(b_2 \cdot b_2 - b_2 \cdot b_2\right) - c \cdot a}}{-a}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}
\] |
+-inverses [=>]39.7 | \[ \frac{\frac{\color{blue}{0} - c \cdot a}{-a}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}
\] |
Taylor expanded in b_2 around -inf 88.4%
Applied egg-rr77.8%
[Start]88.4 | \[ \frac{\frac{0 - c \cdot a}{-a}}{-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}}
\] |
|---|---|
associate-/l/ [=>]77.8 | \[ \color{blue}{\frac{0 - c \cdot a}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)}}
\] |
div-sub [=>]77.8 | \[ \color{blue}{\frac{0}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)} - \frac{c \cdot a}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)}}
\] |
add-sqr-sqrt [=>]43.7 | \[ \frac{0}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)} - \frac{\color{blue}{\sqrt{c \cdot a} \cdot \sqrt{c \cdot a}}}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)}
\] |
sqrt-unprod [=>]48.7 | \[ \frac{0}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)} - \frac{\color{blue}{\sqrt{\left(c \cdot a\right) \cdot \left(c \cdot a\right)}}}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)}
\] |
sqr-neg [<=]48.7 | \[ \frac{0}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)} - \frac{\sqrt{\color{blue}{\left(-c \cdot a\right) \cdot \left(-c \cdot a\right)}}}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)}
\] |
sub0-neg [<=]48.7 | \[ \frac{0}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)} - \frac{\sqrt{\color{blue}{\left(0 - c \cdot a\right)} \cdot \left(-c \cdot a\right)}}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)}
\] |
sub0-neg [<=]48.7 | \[ \frac{0}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)} - \frac{\sqrt{\left(0 - c \cdot a\right) \cdot \color{blue}{\left(0 - c \cdot a\right)}}}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)}
\] |
sqrt-unprod [<=]22.5 | \[ \frac{0}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)} - \frac{\color{blue}{\sqrt{0 - c \cdot a} \cdot \sqrt{0 - c \cdot a}}}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)}
\] |
add-sqr-sqrt [<=]37.4 | \[ \frac{0}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)} - \frac{\color{blue}{0 - c \cdot a}}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)}
\] |
div-sub [=>]37.4 | \[ \frac{0}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)} - \color{blue}{\left(\frac{0}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)} - \frac{c \cdot a}{\left(-2 \cdot b_2 + 0.5 \cdot \frac{c \cdot a}{b_2}\right) \cdot \left(-a\right)}\right)}
\] |
Simplified98.1%
[Start]77.8 | \[ \left(\frac{0}{a \cdot \mathsf{fma}\left(0.5, \frac{c}{\frac{b_2}{a}}, -2 \cdot b_2\right)} - \frac{0}{a \cdot \mathsf{fma}\left(0.5, \frac{c}{\frac{b_2}{a}}, -2 \cdot b_2\right)}\right) + \frac{c \cdot a}{a \cdot \mathsf{fma}\left(0.5, \frac{c}{\frac{b_2}{a}}, -2 \cdot b_2\right)}
\] |
|---|---|
+-inverses [=>]77.8 | \[ \color{blue}{0} + \frac{c \cdot a}{a \cdot \mathsf{fma}\left(0.5, \frac{c}{\frac{b_2}{a}}, -2 \cdot b_2\right)}
\] |
+-lft-identity [=>]77.8 | \[ \color{blue}{\frac{c \cdot a}{a \cdot \mathsf{fma}\left(0.5, \frac{c}{\frac{b_2}{a}}, -2 \cdot b_2\right)}}
\] |
times-frac [=>]71.3 | \[ \color{blue}{\frac{c}{a} \cdot \frac{a}{\mathsf{fma}\left(0.5, \frac{c}{\frac{b_2}{a}}, -2 \cdot b_2\right)}}
\] |
associate-/r/ [<=]74.1 | \[ \color{blue}{\frac{c}{\frac{a}{\frac{a}{\mathsf{fma}\left(0.5, \frac{c}{\frac{b_2}{a}}, -2 \cdot b_2\right)}}}}
\] |
associate-/r/ [=>]98.1 | \[ \frac{c}{\color{blue}{\frac{a}{a} \cdot \mathsf{fma}\left(0.5, \frac{c}{\frac{b_2}{a}}, -2 \cdot b_2\right)}}
\] |
*-inverses [=>]98.1 | \[ \frac{c}{\color{blue}{1} \cdot \mathsf{fma}\left(0.5, \frac{c}{\frac{b_2}{a}}, -2 \cdot b_2\right)}
\] |
*-lft-identity [=>]98.1 | \[ \frac{c}{\color{blue}{\mathsf{fma}\left(0.5, \frac{c}{\frac{b_2}{a}}, -2 \cdot b_2\right)}}
\] |
fma-udef [=>]98.1 | \[ \frac{c}{\color{blue}{0.5 \cdot \frac{c}{\frac{b_2}{a}} + -2 \cdot b_2}}
\] |
+-commutative [<=]98.1 | \[ \frac{c}{\color{blue}{-2 \cdot b_2 + 0.5 \cdot \frac{c}{\frac{b_2}{a}}}}
\] |
*-commutative [=>]98.1 | \[ \frac{c}{\color{blue}{b_2 \cdot -2} + 0.5 \cdot \frac{c}{\frac{b_2}{a}}}
\] |
fma-udef [<=]98.1 | \[ \frac{c}{\color{blue}{\mathsf{fma}\left(b_2, -2, 0.5 \cdot \frac{c}{\frac{b_2}{a}}\right)}}
\] |
*-commutative [=>]98.1 | \[ \frac{c}{\mathsf{fma}\left(b_2, -2, \color{blue}{\frac{c}{\frac{b_2}{a}} \cdot 0.5}\right)}
\] |
associate-/r/ [=>]98.1 | \[ \frac{c}{\mathsf{fma}\left(b_2, -2, \color{blue}{\left(\frac{c}{b_2} \cdot a\right)} \cdot 0.5\right)}
\] |
associate-*l* [=>]98.1 | \[ \frac{c}{\mathsf{fma}\left(b_2, -2, \color{blue}{\frac{c}{b_2} \cdot \left(a \cdot 0.5\right)}\right)}
\] |
if -2.0000000000000001e148 < b_2 < 7.2e-152Initial program 52.3%
Applied egg-rr52.2%
[Start]52.3 | \[ \frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
|---|---|
frac-2neg [=>]52.3 | \[ \color{blue}{\frac{-\left(\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)}{-a}}
\] |
div-inv [=>]52.2 | \[ \color{blue}{\left(-\left(\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}}
\] |
neg-sub0 [=>]52.2 | \[ \color{blue}{\left(0 - \left(\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right)} \cdot \frac{1}{-a}
\] |
add-sqr-sqrt [=>]34.1 | \[ \left(0 - \left(\color{blue}{\sqrt{-b_2} \cdot \sqrt{-b_2}} - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}
\] |
sqrt-unprod [=>]51.7 | \[ \left(0 - \left(\color{blue}{\sqrt{\left(-b_2\right) \cdot \left(-b_2\right)}} - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}
\] |
sqr-neg [=>]51.7 | \[ \left(0 - \left(\sqrt{\color{blue}{b_2 \cdot b_2}} - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}
\] |
sqrt-prod [=>]15.0 | \[ \left(0 - \left(\color{blue}{\sqrt{b_2} \cdot \sqrt{b_2}} - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}
\] |
add-sqr-sqrt [<=]44.9 | \[ \left(0 - \left(\color{blue}{b_2} - \sqrt{b_2 \cdot b_2 - a \cdot c}\right)\right) \cdot \frac{1}{-a}
\] |
associate-+l- [<=]44.9 | \[ \color{blue}{\left(\left(0 - b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}\right)} \cdot \frac{1}{-a}
\] |
neg-sub0 [<=]44.9 | \[ \left(\color{blue}{\left(-b_2\right)} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
add-sqr-sqrt [=>]29.9 | \[ \left(\color{blue}{\sqrt{-b_2} \cdot \sqrt{-b_2}} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
sqrt-unprod [=>]45.0 | \[ \left(\color{blue}{\sqrt{\left(-b_2\right) \cdot \left(-b_2\right)}} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
sqr-neg [=>]45.0 | \[ \left(\sqrt{\color{blue}{b_2 \cdot b_2}} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
sqrt-prod [=>]15.5 | \[ \left(\color{blue}{\sqrt{b_2} \cdot \sqrt{b_2}} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
add-sqr-sqrt [<=]52.2 | \[ \left(\color{blue}{b_2} + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{-a}
\] |
neg-mul-1 [=>]52.2 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{\color{blue}{-1 \cdot a}}
\] |
associate-/r* [=>]52.2 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \color{blue}{\frac{\frac{1}{-1}}{a}}
\] |
metadata-eval [=>]52.2 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{\color{blue}{-1}}{a}
\] |
Simplified52.2%
[Start]52.2 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{-1}{a}
\] |
|---|---|
*-commutative [=>]52.2 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - \color{blue}{c \cdot a}}\right) \cdot \frac{-1}{a}
\] |
Applied egg-rr43.7%
[Start]52.2 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right) \cdot \frac{-1}{a}
\] |
|---|---|
frac-2neg [=>]52.2 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right) \cdot \color{blue}{\frac{--1}{-a}}
\] |
metadata-eval [=>]52.2 | \[ \left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right) \cdot \frac{\color{blue}{1}}{-a}
\] |
un-div-inv [=>]52.3 | \[ \color{blue}{\frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{-a}}
\] |
+-commutative [=>]52.3 | \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - c \cdot a} + b_2}}{-a}
\] |
flip-+ [=>]51.8 | \[ \frac{\color{blue}{\frac{\sqrt{b_2 \cdot b_2 - c \cdot a} \cdot \sqrt{b_2 \cdot b_2 - c \cdot a} - b_2 \cdot b_2}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}}}{-a}
\] |
associate-/l/ [=>]43.6 | \[ \color{blue}{\frac{\sqrt{b_2 \cdot b_2 - c \cdot a} \cdot \sqrt{b_2 \cdot b_2 - c \cdot a} - b_2 \cdot b_2}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}}
\] |
add-sqr-sqrt [<=]43.7 | \[ \frac{\color{blue}{\left(b_2 \cdot b_2 - c \cdot a\right)} - b_2 \cdot b_2}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}
\] |
associate--l- [=>]43.7 | \[ \frac{\color{blue}{b_2 \cdot b_2 - \left(c \cdot a + b_2 \cdot b_2\right)}}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}
\] |
+-commutative [<=]43.7 | \[ \frac{b_2 \cdot b_2 - \color{blue}{\left(b_2 \cdot b_2 + c \cdot a\right)}}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}
\] |
fma-def [=>]43.7 | \[ \frac{b_2 \cdot b_2 - \color{blue}{\mathsf{fma}\left(b_2, b_2, c \cdot a\right)}}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}
\] |
Simplified77.6%
[Start]43.7 | \[ \frac{b_2 \cdot b_2 - \mathsf{fma}\left(b_2, b_2, c \cdot a\right)}{\left(-a\right) \cdot \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2\right)}
\] |
|---|---|
associate-/r* [=>]51.8 | \[ \color{blue}{\frac{\frac{b_2 \cdot b_2 - \mathsf{fma}\left(b_2, b_2, c \cdot a\right)}{-a}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}}
\] |
fma-udef [=>]51.8 | \[ \frac{\frac{b_2 \cdot b_2 - \color{blue}{\left(b_2 \cdot b_2 + c \cdot a\right)}}{-a}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}
\] |
associate--r+ [=>]77.6 | \[ \frac{\frac{\color{blue}{\left(b_2 \cdot b_2 - b_2 \cdot b_2\right) - c \cdot a}}{-a}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}
\] |
+-inverses [=>]77.6 | \[ \frac{\frac{\color{blue}{0} - c \cdot a}{-a}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}
\] |
Taylor expanded in c around 0 85.6%
if 7.2e-152 < b_2 < 4.99999999999999983e117Initial program 91.0%
Applied egg-rr91.0%
[Start]91.0 | \[ \frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
|---|---|
div-sub [=>]91.0 | \[ \color{blue}{\frac{-b_2}{a} - \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}}
\] |
neg-sub0 [=>]91.0 | \[ \frac{\color{blue}{0 - b_2}}{a} - \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
div-sub [=>]91.0 | \[ \color{blue}{\left(\frac{0}{a} - \frac{b_2}{a}\right)} - \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
add-sqr-sqrt [=>]90.8 | \[ \left(\frac{0}{a} - \frac{\color{blue}{\sqrt{b_2} \cdot \sqrt{b_2}}}{a}\right) - \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
sqrt-prod [<=]91.0 | \[ \left(\frac{0}{a} - \frac{\color{blue}{\sqrt{b_2 \cdot b_2}}}{a}\right) - \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
sqr-neg [<=]91.0 | \[ \left(\frac{0}{a} - \frac{\sqrt{\color{blue}{\left(-b_2\right) \cdot \left(-b_2\right)}}}{a}\right) - \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
sqrt-unprod [<=]0.0 | \[ \left(\frac{0}{a} - \frac{\color{blue}{\sqrt{-b_2} \cdot \sqrt{-b_2}}}{a}\right) - \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
add-sqr-sqrt [<=]31.4 | \[ \left(\frac{0}{a} - \frac{\color{blue}{-b_2}}{a}\right) - \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
associate--l- [=>]31.4 | \[ \color{blue}{\frac{0}{a} - \left(\frac{-b_2}{a} + \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\right)}
\] |
add-sqr-sqrt [=>]0.0 | \[ \frac{0}{a} - \left(\frac{\color{blue}{\sqrt{-b_2} \cdot \sqrt{-b_2}}}{a} + \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\right)
\] |
sqrt-unprod [=>]91.0 | \[ \frac{0}{a} - \left(\frac{\color{blue}{\sqrt{\left(-b_2\right) \cdot \left(-b_2\right)}}}{a} + \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\right)
\] |
sqr-neg [=>]91.0 | \[ \frac{0}{a} - \left(\frac{\sqrt{\color{blue}{b_2 \cdot b_2}}}{a} + \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\right)
\] |
sqrt-prod [=>]90.8 | \[ \frac{0}{a} - \left(\frac{\color{blue}{\sqrt{b_2} \cdot \sqrt{b_2}}}{a} + \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\right)
\] |
add-sqr-sqrt [<=]91.0 | \[ \frac{0}{a} - \left(\frac{\color{blue}{b_2}}{a} + \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\right)
\] |
Simplified91.0%
[Start]91.0 | \[ \frac{0}{a} - \left(\frac{b_2}{a} + \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\right)
\] |
|---|---|
div0 [=>]91.0 | \[ \color{blue}{0} - \left(\frac{b_2}{a} + \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\right)
\] |
+-commutative [=>]91.0 | \[ 0 - \color{blue}{\left(\frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a} + \frac{b_2}{a}\right)}
\] |
associate--r+ [=>]91.0 | \[ \color{blue}{\left(0 - \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\right) - \frac{b_2}{a}}
\] |
neg-sub0 [<=]91.0 | \[ \color{blue}{\left(-\frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\right)} - \frac{b_2}{a}
\] |
distribute-neg-frac [=>]91.0 | \[ \color{blue}{\frac{-\sqrt{b_2 \cdot b_2 - a \cdot c}}{a}} - \frac{b_2}{a}
\] |
*-commutative [=>]91.0 | \[ \frac{-\sqrt{b_2 \cdot b_2 - \color{blue}{c \cdot a}}}{a} - \frac{b_2}{a}
\] |
if 4.99999999999999983e117 < b_2 Initial program 20.3%
Taylor expanded in b_2 around inf 94.5%
Final simplification90.4%
| Alternative 1 | |
|---|---|
| Accuracy | 90.4% |
| Cost | 7564 |
| Alternative 2 | |
|---|---|
| Accuracy | 85.2% |
| Cost | 7368 |
| Alternative 3 | |
|---|---|
| Accuracy | 85.2% |
| Cost | 7368 |
| Alternative 4 | |
|---|---|
| Accuracy | 79.7% |
| Cost | 7176 |
| Alternative 5 | |
|---|---|
| Accuracy | 43.8% |
| Cost | 452 |
| Alternative 6 | |
|---|---|
| Accuracy | 65.8% |
| Cost | 452 |
| Alternative 7 | |
|---|---|
| Accuracy | 16.9% |
| Cost | 388 |
| Alternative 8 | |
|---|---|
| Accuracy | 12.1% |
| Cost | 64 |
herbie shell --seed 2023126
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))