| Alternative 1 | |
|---|---|
| Accuracy | 87.5% |
| Cost | 7820 |

(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) (* a c)))))
(if (<= b_2 -1.7e+128)
(+ (* -2.0 (/ b_2 a)) (* 0.5 (/ c b_2)))
(if (<= b_2 1.25e-146)
(/ (- t_0 b_2) a)
(if (<= b_2 1.16e+94)
(/ (/ (* a (- c)) (+ b_2 t_0)) 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) - (a * c)));
double tmp;
if (b_2 <= -1.7e+128) {
tmp = (-2.0 * (b_2 / a)) + (0.5 * (c / b_2));
} else if (b_2 <= 1.25e-146) {
tmp = (t_0 - b_2) / a;
} else if (b_2 <= 1.16e+94) {
tmp = ((a * -c) / (b_2 + t_0)) / a;
} else {
tmp = (c / b_2) * -0.5;
}
return tmp;
}
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
code = (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a
end function
real(8) function code(a, b_2, c)
real(8), intent (in) :: a
real(8), intent (in) :: b_2
real(8), intent (in) :: c
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(((b_2 * b_2) - (a * c)))
if (b_2 <= (-1.7d+128)) then
tmp = ((-2.0d0) * (b_2 / a)) + (0.5d0 * (c / b_2))
else if (b_2 <= 1.25d-146) then
tmp = (t_0 - b_2) / a
else if (b_2 <= 1.16d+94) then
tmp = ((a * -c) / (b_2 + t_0)) / a
else
tmp = (c / b_2) * (-0.5d0)
end if
code = tmp
end function
public static double code(double a, double b_2, double c) {
return (-b_2 + Math.sqrt(((b_2 * b_2) - (a * c)))) / a;
}
public static double code(double a, double b_2, double c) {
double t_0 = Math.sqrt(((b_2 * b_2) - (a * c)));
double tmp;
if (b_2 <= -1.7e+128) {
tmp = (-2.0 * (b_2 / a)) + (0.5 * (c / b_2));
} else if (b_2 <= 1.25e-146) {
tmp = (t_0 - b_2) / a;
} else if (b_2 <= 1.16e+94) {
tmp = ((a * -c) / (b_2 + t_0)) / a;
} else {
tmp = (c / b_2) * -0.5;
}
return tmp;
}
def code(a, b_2, c): return (-b_2 + math.sqrt(((b_2 * b_2) - (a * c)))) / a
def code(a, b_2, c): t_0 = math.sqrt(((b_2 * b_2) - (a * c))) tmp = 0 if b_2 <= -1.7e+128: tmp = (-2.0 * (b_2 / a)) + (0.5 * (c / b_2)) elif b_2 <= 1.25e-146: tmp = (t_0 - b_2) / a elif b_2 <= 1.16e+94: tmp = ((a * -c) / (b_2 + t_0)) / a else: tmp = (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(a * c))) tmp = 0.0 if (b_2 <= -1.7e+128) tmp = Float64(Float64(-2.0 * Float64(b_2 / a)) + Float64(0.5 * Float64(c / b_2))); elseif (b_2 <= 1.25e-146) tmp = Float64(Float64(t_0 - b_2) / a); elseif (b_2 <= 1.16e+94) tmp = Float64(Float64(Float64(a * Float64(-c)) / Float64(b_2 + t_0)) / a); else tmp = Float64(Float64(c / b_2) * -0.5); end return tmp end
function tmp = code(a, b_2, c) tmp = (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a; end
function tmp_2 = code(a, b_2, c) t_0 = sqrt(((b_2 * b_2) - (a * c))); tmp = 0.0; if (b_2 <= -1.7e+128) tmp = (-2.0 * (b_2 / a)) + (0.5 * (c / b_2)); elseif (b_2 <= 1.25e-146) tmp = (t_0 - b_2) / a; elseif (b_2 <= 1.16e+94) tmp = ((a * -c) / (b_2 + t_0)) / a; else tmp = (c / b_2) * -0.5; end tmp_2 = 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[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$2, -1.7e+128], N[(N[(-2.0 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 1.25e-146], N[(N[(t$95$0 - b$95$2), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b$95$2, 1.16e+94], N[(N[(N[(a * (-c)), $MachinePrecision] / N[(b$95$2 + t$95$0), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(c / b$95$2), $MachinePrecision] * -0.5), $MachinePrecision]]]]]
\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{b_2 \cdot b_2 - a \cdot c}\\
\mathbf{if}\;b_2 \leq -1.7 \cdot 10^{+128}:\\
\;\;\;\;-2 \cdot \frac{b_2}{a} + 0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq 1.25 \cdot 10^{-146}:\\
\;\;\;\;\frac{t_0 - b_2}{a}\\
\mathbf{elif}\;b_2 \leq 1.16 \cdot 10^{+94}:\\
\;\;\;\;\frac{\frac{a \cdot \left(-c\right)}{b_2 + t_0}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b_2} \cdot -0.5\\
\end{array}
\end{array}
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Results
if b_2 < -1.6999999999999999e128Initial program 54.1%
Simplified54.1%
[Start]54.1% | \[ \frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
|---|---|
+-commutative [=>]54.1% | \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} + \left(-b_2\right)}}{a}
\] |
unsub-neg [=>]54.1% | \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{a}
\] |
Taylor expanded in b_2 around -inf 98.1%
if -1.6999999999999999e128 < b_2 < 1.24999999999999989e-146Initial program 82.4%
Simplified82.4%
[Start]82.4% | \[ \frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
|---|---|
+-commutative [=>]82.4% | \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} + \left(-b_2\right)}}{a}
\] |
unsub-neg [=>]82.4% | \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{a}
\] |
if 1.24999999999999989e-146 < b_2 < 1.1599999999999999e94Initial program 45.6%
Simplified45.6%
[Start]45.6% | \[ \frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
|---|---|
+-commutative [=>]45.6% | \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} + \left(-b_2\right)}}{a}
\] |
unsub-neg [=>]45.6% | \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{a}
\] |
Applied egg-rr45.6%
[Start]45.6% | \[ \frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}
\] |
|---|---|
add-sqr-sqrt [=>]45.5% | \[ \frac{\color{blue}{\sqrt{\sqrt{b_2 \cdot b_2 - a \cdot c}} \cdot \sqrt{\sqrt{b_2 \cdot b_2 - a \cdot c}}} - b_2}{a}
\] |
pow2 [=>]45.5% | \[ \frac{\color{blue}{{\left(\sqrt{\sqrt{b_2 \cdot b_2 - a \cdot c}}\right)}^{2}} - b_2}{a}
\] |
pow1/2 [=>]45.5% | \[ \frac{{\left(\sqrt{\color{blue}{{\left(b_2 \cdot b_2 - a \cdot c\right)}^{0.5}}}\right)}^{2} - b_2}{a}
\] |
sqrt-pow1 [=>]45.5% | \[ \frac{{\color{blue}{\left({\left(b_2 \cdot b_2 - a \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2} - b_2}{a}
\] |
fma-neg [=>]45.6% | \[ \frac{{\left({\color{blue}{\left(\mathsf{fma}\left(b_2, b_2, -a \cdot c\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2} - b_2}{a}
\] |
*-commutative [=>]45.6% | \[ \frac{{\left({\left(\mathsf{fma}\left(b_2, b_2, -\color{blue}{c \cdot a}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2} - b_2}{a}
\] |
distribute-rgt-neg-in [=>]45.6% | \[ \frac{{\left({\left(\mathsf{fma}\left(b_2, b_2, \color{blue}{c \cdot \left(-a\right)}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2} - b_2}{a}
\] |
metadata-eval [=>]45.6% | \[ \frac{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{\color{blue}{0.25}}\right)}^{2} - b_2}{a}
\] |
Applied egg-rr45.4%
[Start]45.6% | \[ \frac{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} - b_2}{a}
\] |
|---|---|
flip-- [=>]45.2% | \[ \frac{\color{blue}{\frac{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} \cdot {\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} - b_2 \cdot b_2}{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} + b_2}}}{a}
\] |
pow-pow [=>]45.5% | \[ \frac{\frac{\color{blue}{{\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{\left(0.25 \cdot 2\right)}} \cdot {\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} - b_2 \cdot b_2}{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} + b_2}}{a}
\] |
metadata-eval [=>]45.5% | \[ \frac{\frac{{\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{\color{blue}{0.5}} \cdot {\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} - b_2 \cdot b_2}{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} + b_2}}{a}
\] |
pow-pow [=>]45.0% | \[ \frac{\frac{{\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.5} \cdot \color{blue}{{\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{\left(0.25 \cdot 2\right)}} - b_2 \cdot b_2}{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} + b_2}}{a}
\] |
metadata-eval [=>]45.0% | \[ \frac{\frac{{\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.5} \cdot {\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{\color{blue}{0.5}} - b_2 \cdot b_2}{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} + b_2}}{a}
\] |
pow-prod-up [=>]45.3% | \[ \frac{\frac{\color{blue}{{\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{\left(0.5 + 0.5\right)}} - b_2 \cdot b_2}{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} + b_2}}{a}
\] |
metadata-eval [=>]45.3% | \[ \frac{\frac{{\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{\color{blue}{1}} - b_2 \cdot b_2}{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} + b_2}}{a}
\] |
pow1 [<=]45.3% | \[ \frac{\frac{\color{blue}{\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)} - b_2 \cdot b_2}{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} + b_2}}{a}
\] |
distribute-rgt-neg-out [=>]45.3% | \[ \frac{\frac{\mathsf{fma}\left(b_2, b_2, \color{blue}{-c \cdot a}\right) - b_2 \cdot b_2}{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} + b_2}}{a}
\] |
fma-neg [<=]45.3% | \[ \frac{\frac{\color{blue}{\left(b_2 \cdot b_2 - c \cdot a\right)} - b_2 \cdot b_2}{{\left({\left(\mathsf{fma}\left(b_2, b_2, c \cdot \left(-a\right)\right)\right)}^{0.25}\right)}^{2} + b_2}}{a}
\] |
Simplified45.4%
[Start]45.4% | \[ \frac{\frac{\left(b_2 \cdot b_2 - c \cdot a\right) - b_2 \cdot b_2}{{\left(b_2 \cdot b_2 - c \cdot a\right)}^{0.5} + b_2}}{a}
\] |
|---|---|
unpow2 [<=]45.4% | \[ \frac{\frac{\left(\color{blue}{{b_2}^{2}} - c \cdot a\right) - b_2 \cdot b_2}{{\left(b_2 \cdot b_2 - c \cdot a\right)}^{0.5} + b_2}}{a}
\] |
unpow2 [<=]45.4% | \[ \frac{\frac{\left({b_2}^{2} - c \cdot a\right) - \color{blue}{{b_2}^{2}}}{{\left(b_2 \cdot b_2 - c \cdot a\right)}^{0.5} + b_2}}{a}
\] |
associate--l- [=>]45.4% | \[ \frac{\frac{\color{blue}{{b_2}^{2} - \left(c \cdot a + {b_2}^{2}\right)}}{{\left(b_2 \cdot b_2 - c \cdot a\right)}^{0.5} + b_2}}{a}
\] |
unpow2 [=>]45.4% | \[ \frac{\frac{\color{blue}{b_2 \cdot b_2} - \left(c \cdot a + {b_2}^{2}\right)}{{\left(b_2 \cdot b_2 - c \cdot a\right)}^{0.5} + b_2}}{a}
\] |
unpow2 [=>]45.4% | \[ \frac{\frac{b_2 \cdot b_2 - \left(c \cdot a + \color{blue}{b_2 \cdot b_2}\right)}{{\left(b_2 \cdot b_2 - c \cdot a\right)}^{0.5} + b_2}}{a}
\] |
+-commutative [=>]45.4% | \[ \frac{\frac{b_2 \cdot b_2 - \left(c \cdot a + b_2 \cdot b_2\right)}{\color{blue}{b_2 + {\left(b_2 \cdot b_2 - c \cdot a\right)}^{0.5}}}}{a}
\] |
unpow1/2 [=>]45.4% | \[ \frac{\frac{b_2 \cdot b_2 - \left(c \cdot a + b_2 \cdot b_2\right)}{b_2 + \color{blue}{\sqrt{b_2 \cdot b_2 - c \cdot a}}}}{a}
\] |
Applied egg-rr3.1%
[Start]45.4% | \[ \frac{\frac{b_2 \cdot b_2 - \left(c \cdot a + b_2 \cdot b_2\right)}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
|---|---|
associate--r+ [=>]45.4% | \[ \frac{\frac{\color{blue}{\left(b_2 \cdot b_2 - c \cdot a\right) - b_2 \cdot b_2}}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
add-log-exp [=>]4.0% | \[ \frac{\frac{\color{blue}{\log \left(e^{b_2 \cdot b_2 - c \cdot a}\right)} - b_2 \cdot b_2}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
add-log-exp [=>]3.1% | \[ \frac{\frac{\log \left(e^{b_2 \cdot b_2 - c \cdot a}\right) - \color{blue}{\log \left(e^{b_2 \cdot b_2}\right)}}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
diff-log [=>]3.1% | \[ \frac{\frac{\color{blue}{\log \left(\frac{e^{b_2 \cdot b_2 - c \cdot a}}{e^{b_2 \cdot b_2}}\right)}}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
add-log-exp [=>]3.1% | \[ \frac{\frac{\log \left(\frac{e^{b_2 \cdot b_2 - c \cdot a}}{e^{\color{blue}{\log \left(e^{b_2}\right)} \cdot b_2}}\right)}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
exp-to-pow [=>]3.1% | \[ \frac{\frac{\log \left(\frac{e^{b_2 \cdot b_2 - c \cdot a}}{\color{blue}{{\left(e^{b_2}\right)}^{b_2}}}\right)}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
Simplified80.1%
[Start]3.1% | \[ \frac{\frac{\log \left(\frac{e^{b_2 \cdot b_2 - c \cdot a}}{{\left(e^{b_2}\right)}^{b_2}}\right)}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
|---|---|
log-div [=>]3.1% | \[ \frac{\frac{\color{blue}{\log \left(e^{b_2 \cdot b_2 - c \cdot a}\right) - \log \left({\left(e^{b_2}\right)}^{b_2}\right)}}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
rem-log-exp [=>]29.0% | \[ \frac{\frac{\color{blue}{\left(b_2 \cdot b_2 - c \cdot a\right)} - \log \left({\left(e^{b_2}\right)}^{b_2}\right)}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
log-pow [=>]29.2% | \[ \frac{\frac{\left(b_2 \cdot b_2 - c \cdot a\right) - \color{blue}{b_2 \cdot \log \left(e^{b_2}\right)}}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
rem-log-exp [=>]45.4% | \[ \frac{\frac{\left(b_2 \cdot b_2 - c \cdot a\right) - b_2 \cdot \color{blue}{b_2}}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
unsub-neg [<=]45.4% | \[ \frac{\frac{\color{blue}{\left(b_2 \cdot b_2 - c \cdot a\right) + \left(-b_2 \cdot b_2\right)}}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
sub-neg [=>]45.4% | \[ \frac{\frac{\color{blue}{\left(b_2 \cdot b_2 + \left(-c \cdot a\right)\right)} + \left(-b_2 \cdot b_2\right)}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
+-commutative [<=]45.4% | \[ \frac{\frac{\color{blue}{\left(\left(-c \cdot a\right) + b_2 \cdot b_2\right)} + \left(-b_2 \cdot b_2\right)}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
associate-+l+ [=>]80.1% | \[ \frac{\frac{\color{blue}{\left(-c \cdot a\right) + \left(b_2 \cdot b_2 + \left(-b_2 \cdot b_2\right)\right)}}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
distribute-rgt-neg-in [=>]80.1% | \[ \frac{\frac{\color{blue}{c \cdot \left(-a\right)} + \left(b_2 \cdot b_2 + \left(-b_2 \cdot b_2\right)\right)}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
sub-neg [<=]80.1% | \[ \frac{\frac{c \cdot \left(-a\right) + \color{blue}{\left(b_2 \cdot b_2 - b_2 \cdot b_2\right)}}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
+-inverses [=>]80.1% | \[ \frac{\frac{c \cdot \left(-a\right) + \color{blue}{0}}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}{a}
\] |
if 1.1599999999999999e94 < b_2 Initial program 8.4%
Simplified8.4%
[Start]8.4% | \[ \frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\] |
|---|---|
+-commutative [=>]8.4% | \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} + \left(-b_2\right)}}{a}
\] |
unsub-neg [=>]8.4% | \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{a}
\] |
Taylor expanded in b_2 around inf 98.5%
Final simplification88.8%
| Alternative 1 | |
|---|---|
| Accuracy | 87.5% |
| Cost | 7820 |
| Alternative 2 | |
|---|---|
| Accuracy | 84.9% |
| Cost | 7432 |
| Alternative 3 | |
|---|---|
| Accuracy | 85.2% |
| Cost | 7368 |
| Alternative 4 | |
|---|---|
| Accuracy | 79.7% |
| Cost | 7176 |
| Alternative 5 | |
|---|---|
| Accuracy | 68.7% |
| Cost | 836 |
| Alternative 6 | |
|---|---|
| Accuracy | 47.8% |
| Cost | 452 |
| Alternative 7 | |
|---|---|
| Accuracy | 68.3% |
| Cost | 452 |
| Alternative 8 | |
|---|---|
| Accuracy | 68.4% |
| Cost | 452 |
| Alternative 9 | |
|---|---|
| Accuracy | 23.4% |
| Cost | 388 |
| Alternative 10 | |
|---|---|
| Accuracy | 10.7% |
| Cost | 192 |
herbie shell --seed 2023167
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
:precision binary64
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))