| Alternative 1 | |
|---|---|
| Accuracy | 88.5% |
| Cost | 33552 |
(FPCore (a b c d) :precision binary64 (/ (- (* b c) (* a d)) (+ (* c c) (* d d))))
(FPCore (a b c d)
:precision binary64
(let* ((t_0 (* a (* d (pow (hypot d c) -2.0))))
(t_1 (fma (/ c (hypot c d)) (/ b (hypot c d)) (/ (- a) d)))
(t_2 (cbrt (/ c (hypot d c))))
(t_3
(+ (* 0.0 t_0) (- (* (pow t_2 2.0) (* t_2 (/ b (hypot d c)))) t_0))))
(if (<= d -1e+182)
t_1
(if (<= d 1.55e-279)
t_3
(if (<= d 1.7e-103)
(* (/ 1.0 (hypot c d)) (/ (- (* c b) (* d a)) (hypot c d)))
(if (<= d 2.05e+133) t_3 t_1))))))double code(double a, double b, double c, double d) {
return ((b * c) - (a * d)) / ((c * c) + (d * d));
}
double code(double a, double b, double c, double d) {
double t_0 = a * (d * pow(hypot(d, c), -2.0));
double t_1 = fma((c / hypot(c, d)), (b / hypot(c, d)), (-a / d));
double t_2 = cbrt((c / hypot(d, c)));
double t_3 = (0.0 * t_0) + ((pow(t_2, 2.0) * (t_2 * (b / hypot(d, c)))) - t_0);
double tmp;
if (d <= -1e+182) {
tmp = t_1;
} else if (d <= 1.55e-279) {
tmp = t_3;
} else if (d <= 1.7e-103) {
tmp = (1.0 / hypot(c, d)) * (((c * b) - (d * a)) / hypot(c, d));
} else if (d <= 2.05e+133) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
function code(a, b, c, d) return Float64(Float64(Float64(b * c) - Float64(a * d)) / Float64(Float64(c * c) + Float64(d * d))) end
function code(a, b, c, d) t_0 = Float64(a * Float64(d * (hypot(d, c) ^ -2.0))) t_1 = fma(Float64(c / hypot(c, d)), Float64(b / hypot(c, d)), Float64(Float64(-a) / d)) t_2 = cbrt(Float64(c / hypot(d, c))) t_3 = Float64(Float64(0.0 * t_0) + Float64(Float64((t_2 ^ 2.0) * Float64(t_2 * Float64(b / hypot(d, c)))) - t_0)) tmp = 0.0 if (d <= -1e+182) tmp = t_1; elseif (d <= 1.55e-279) tmp = t_3; elseif (d <= 1.7e-103) tmp = Float64(Float64(1.0 / hypot(c, d)) * Float64(Float64(Float64(c * b) - Float64(d * a)) / hypot(c, d))); elseif (d <= 2.05e+133) tmp = t_3; else tmp = t_1; end return tmp end
code[a_, b_, c_, d_] := N[(N[(N[(b * c), $MachinePrecision] - N[(a * d), $MachinePrecision]), $MachinePrecision] / N[(N[(c * c), $MachinePrecision] + N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[a_, b_, c_, d_] := Block[{t$95$0 = N[(a * N[(d * N[Power[N[Sqrt[d ^ 2 + c ^ 2], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(c / N[Sqrt[c ^ 2 + d ^ 2], $MachinePrecision]), $MachinePrecision] * N[(b / N[Sqrt[c ^ 2 + d ^ 2], $MachinePrecision]), $MachinePrecision] + N[((-a) / d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(c / N[Sqrt[d ^ 2 + c ^ 2], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[(0.0 * t$95$0), $MachinePrecision] + N[(N[(N[Power[t$95$2, 2.0], $MachinePrecision] * N[(t$95$2 * N[(b / N[Sqrt[d ^ 2 + c ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1e+182], t$95$1, If[LessEqual[d, 1.55e-279], t$95$3, If[LessEqual[d, 1.7e-103], N[(N[(1.0 / N[Sqrt[c ^ 2 + d ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(c * b), $MachinePrecision] - N[(d * a), $MachinePrecision]), $MachinePrecision] / N[Sqrt[c ^ 2 + d ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.05e+133], t$95$3, t$95$1]]]]]]]]
\frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}
\begin{array}{l}
t_0 := a \cdot \left(d \cdot {\left(\mathsf{hypot}\left(d, c\right)\right)}^{-2}\right)\\
t_1 := \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\mathsf{hypot}\left(c, d\right)}, \frac{-a}{d}\right)\\
t_2 := \sqrt[3]{\frac{c}{\mathsf{hypot}\left(d, c\right)}}\\
t_3 := 0 \cdot t_0 + \left({t_2}^{2} \cdot \left(t_2 \cdot \frac{b}{\mathsf{hypot}\left(d, c\right)}\right) - t_0\right)\\
\mathbf{if}\;d \leq -1 \cdot 10^{+182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d \leq 1.55 \cdot 10^{-279}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;d \leq 1.7 \cdot 10^{-103}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(c, d\right)} \cdot \frac{c \cdot b - d \cdot a}{\mathsf{hypot}\left(c, d\right)}\\
\mathbf{elif}\;d \leq 2.05 \cdot 10^{+133}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
| Original | 58.3% |
|---|---|
| Target | 99.3% |
| Herbie | 89.2% |
if d < -1.0000000000000001e182 or 2.05000000000000002e133 < d Initial program 32.6%
Simplified32.6%
[Start]32.6 | \[ \frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}
\] |
|---|---|
fma-def [=>]32.6 | \[ \frac{b \cdot c - a \cdot d}{\color{blue}{\mathsf{fma}\left(c, c, d \cdot d\right)}}
\] |
Applied egg-rr46.5%
[Start]32.6 | \[ \frac{b \cdot c - a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}
\] |
|---|---|
div-sub [=>]32.6 | \[ \color{blue}{\frac{b \cdot c}{\mathsf{fma}\left(c, c, d \cdot d\right)} - \frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}}
\] |
*-commutative [=>]32.6 | \[ \frac{\color{blue}{c \cdot b}}{\mathsf{fma}\left(c, c, d \cdot d\right)} - \frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}
\] |
add-sqr-sqrt [=>]32.6 | \[ \frac{c \cdot b}{\color{blue}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)} \cdot \sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}} - \frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}
\] |
times-frac [=>]33.0 | \[ \color{blue}{\frac{c}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}} \cdot \frac{b}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}} - \frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}
\] |
fma-neg [=>]33.0 | \[ \color{blue}{\mathsf{fma}\left(\frac{c}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}, \frac{b}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}, -\frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)}
\] |
fma-udef [=>]33.0 | \[ \mathsf{fma}\left(\frac{c}{\sqrt{\color{blue}{c \cdot c + d \cdot d}}}, \frac{b}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}, -\frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)
\] |
hypot-def [=>]33.0 | \[ \mathsf{fma}\left(\frac{c}{\color{blue}{\mathsf{hypot}\left(c, d\right)}}, \frac{b}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}, -\frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)
\] |
fma-udef [=>]33.0 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\sqrt{\color{blue}{c \cdot c + d \cdot d}}}, -\frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)
\] |
hypot-def [=>]46.5 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\color{blue}{\mathsf{hypot}\left(c, d\right)}}, -\frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)
\] |
add-sqr-sqrt [=>]46.5 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\mathsf{hypot}\left(c, d\right)}, -\frac{a \cdot d}{\color{blue}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)} \cdot \sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}}\right)
\] |
pow2 [=>]46.5 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\mathsf{hypot}\left(c, d\right)}, -\frac{a \cdot d}{\color{blue}{{\left(\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)}^{2}}}\right)
\] |
fma-udef [=>]46.5 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\mathsf{hypot}\left(c, d\right)}, -\frac{a \cdot d}{{\left(\sqrt{\color{blue}{c \cdot c + d \cdot d}}\right)}^{2}}\right)
\] |
hypot-def [=>]46.5 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\mathsf{hypot}\left(c, d\right)}, -\frac{a \cdot d}{{\color{blue}{\left(\mathsf{hypot}\left(c, d\right)\right)}}^{2}}\right)
\] |
Taylor expanded in d around inf 93.2%
if -1.0000000000000001e182 < d < 1.55e-279 or 1.70000000000000001e-103 < d < 2.05000000000000002e133Initial program 68.3%
Simplified68.3%
[Start]68.3 | \[ \frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}
\] |
|---|---|
fma-def [=>]68.3 | \[ \frac{b \cdot c - a \cdot d}{\color{blue}{\mathsf{fma}\left(c, c, d \cdot d\right)}}
\] |
Applied egg-rr85.8%
[Start]68.3 | \[ \frac{b \cdot c - a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}
\] |
|---|---|
div-sub [=>]68.3 | \[ \color{blue}{\frac{b \cdot c}{\mathsf{fma}\left(c, c, d \cdot d\right)} - \frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}}
\] |
*-commutative [=>]68.3 | \[ \frac{\color{blue}{c \cdot b}}{\mathsf{fma}\left(c, c, d \cdot d\right)} - \frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}
\] |
add-sqr-sqrt [=>]68.3 | \[ \frac{c \cdot b}{\color{blue}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)} \cdot \sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}} - \frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}
\] |
times-frac [=>]70.8 | \[ \color{blue}{\frac{c}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}} \cdot \frac{b}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}} - \frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}
\] |
fma-neg [=>]70.8 | \[ \color{blue}{\mathsf{fma}\left(\frac{c}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}, \frac{b}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}, -\frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)}
\] |
fma-udef [=>]70.8 | \[ \mathsf{fma}\left(\frac{c}{\sqrt{\color{blue}{c \cdot c + d \cdot d}}}, \frac{b}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}, -\frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)
\] |
hypot-def [=>]70.8 | \[ \mathsf{fma}\left(\frac{c}{\color{blue}{\mathsf{hypot}\left(c, d\right)}}, \frac{b}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}, -\frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)
\] |
fma-udef [=>]70.8 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\sqrt{\color{blue}{c \cdot c + d \cdot d}}}, -\frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)
\] |
hypot-def [=>]85.8 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\color{blue}{\mathsf{hypot}\left(c, d\right)}}, -\frac{a \cdot d}{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)
\] |
add-sqr-sqrt [=>]85.8 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\mathsf{hypot}\left(c, d\right)}, -\frac{a \cdot d}{\color{blue}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)} \cdot \sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}}\right)
\] |
pow2 [=>]85.8 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\mathsf{hypot}\left(c, d\right)}, -\frac{a \cdot d}{\color{blue}{{\left(\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)}^{2}}}\right)
\] |
fma-udef [=>]85.8 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\mathsf{hypot}\left(c, d\right)}, -\frac{a \cdot d}{{\left(\sqrt{\color{blue}{c \cdot c + d \cdot d}}\right)}^{2}}\right)
\] |
hypot-def [=>]85.8 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\mathsf{hypot}\left(c, d\right)}, -\frac{a \cdot d}{{\color{blue}{\left(\mathsf{hypot}\left(c, d\right)\right)}}^{2}}\right)
\] |
Applied egg-rr89.7%
[Start]85.8 | \[ \mathsf{fma}\left(\frac{c}{\mathsf{hypot}\left(c, d\right)}, \frac{b}{\mathsf{hypot}\left(c, d\right)}, -\frac{a \cdot d}{{\left(\mathsf{hypot}\left(c, d\right)\right)}^{2}}\right)
\] |
|---|---|
fma-neg [<=]85.8 | \[ \color{blue}{\frac{c}{\mathsf{hypot}\left(c, d\right)} \cdot \frac{b}{\mathsf{hypot}\left(c, d\right)} - \frac{a \cdot d}{{\left(\mathsf{hypot}\left(c, d\right)\right)}^{2}}}
\] |
div-inv [=>]85.6 | \[ \frac{c}{\mathsf{hypot}\left(c, d\right)} \cdot \frac{b}{\mathsf{hypot}\left(c, d\right)} - \color{blue}{\left(a \cdot d\right) \cdot \frac{1}{{\left(\mathsf{hypot}\left(c, d\right)\right)}^{2}}}
\] |
add-cube-cbrt [=>]85.4 | \[ \color{blue}{\left(\left(\sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}} \cdot \sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}}\right) \cdot \sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}}\right)} \cdot \frac{b}{\mathsf{hypot}\left(c, d\right)} - \left(a \cdot d\right) \cdot \frac{1}{{\left(\mathsf{hypot}\left(c, d\right)\right)}^{2}}
\] |
associate-*l* [=>]85.4 | \[ \color{blue}{\left(\sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}} \cdot \sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}}\right) \cdot \left(\sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}} \cdot \frac{b}{\mathsf{hypot}\left(c, d\right)}\right)} - \left(a \cdot d\right) \cdot \frac{1}{{\left(\mathsf{hypot}\left(c, d\right)\right)}^{2}}
\] |
associate-*l* [=>]89.2 | \[ \left(\sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}} \cdot \sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}}\right) \cdot \left(\sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}} \cdot \frac{b}{\mathsf{hypot}\left(c, d\right)}\right) - \color{blue}{a \cdot \left(d \cdot \frac{1}{{\left(\mathsf{hypot}\left(c, d\right)\right)}^{2}}\right)}
\] |
prod-diff [=>]89.2 | \[ \color{blue}{\mathsf{fma}\left(\sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}} \cdot \sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}}, \sqrt[3]{\frac{c}{\mathsf{hypot}\left(c, d\right)}} \cdot \frac{b}{\mathsf{hypot}\left(c, d\right)}, -\left(d \cdot \frac{1}{{\left(\mathsf{hypot}\left(c, d\right)\right)}^{2}}\right) \cdot a\right) + \mathsf{fma}\left(-d \cdot \frac{1}{{\left(\mathsf{hypot}\left(c, d\right)\right)}^{2}}, a, \left(d \cdot \frac{1}{{\left(\mathsf{hypot}\left(c, d\right)\right)}^{2}}\right) \cdot a\right)}
\] |
Simplified89.7%
[Start]89.7 | \[ \mathsf{fma}\left({\left(\sqrt[3]{\frac{c}{\mathsf{hypot}\left(d, c\right)}}\right)}^{2}, \sqrt[3]{\frac{c}{\mathsf{hypot}\left(d, c\right)}} \cdot \frac{b}{\mathsf{hypot}\left(d, c\right)}, -\left(d \cdot {\left(\mathsf{hypot}\left(d, c\right)\right)}^{-2}\right) \cdot a\right) + \mathsf{fma}\left(-d \cdot {\left(\mathsf{hypot}\left(d, c\right)\right)}^{-2}, a, \left(d \cdot {\left(\mathsf{hypot}\left(d, c\right)\right)}^{-2}\right) \cdot a\right)
\] |
|---|---|
+-commutative [=>]89.7 | \[ \color{blue}{\mathsf{fma}\left(-d \cdot {\left(\mathsf{hypot}\left(d, c\right)\right)}^{-2}, a, \left(d \cdot {\left(\mathsf{hypot}\left(d, c\right)\right)}^{-2}\right) \cdot a\right) + \mathsf{fma}\left({\left(\sqrt[3]{\frac{c}{\mathsf{hypot}\left(d, c\right)}}\right)}^{2}, \sqrt[3]{\frac{c}{\mathsf{hypot}\left(d, c\right)}} \cdot \frac{b}{\mathsf{hypot}\left(d, c\right)}, -\left(d \cdot {\left(\mathsf{hypot}\left(d, c\right)\right)}^{-2}\right) \cdot a\right)}
\] |
if 1.55e-279 < d < 1.70000000000000001e-103Initial program 64.3%
Applied egg-rr78.6%
[Start]64.3 | \[ \frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}
\] |
|---|---|
*-un-lft-identity [=>]64.3 | \[ \frac{\color{blue}{1 \cdot \left(b \cdot c - a \cdot d\right)}}{c \cdot c + d \cdot d}
\] |
add-sqr-sqrt [=>]64.3 | \[ \frac{1 \cdot \left(b \cdot c - a \cdot d\right)}{\color{blue}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}}
\] |
times-frac [=>]64.3 | \[ \color{blue}{\frac{1}{\sqrt{c \cdot c + d \cdot d}} \cdot \frac{b \cdot c - a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}
\] |
hypot-def [=>]64.3 | \[ \frac{1}{\color{blue}{\mathsf{hypot}\left(c, d\right)}} \cdot \frac{b \cdot c - a \cdot d}{\sqrt{c \cdot c + d \cdot d}}
\] |
hypot-def [=>]78.6 | \[ \frac{1}{\mathsf{hypot}\left(c, d\right)} \cdot \frac{b \cdot c - a \cdot d}{\color{blue}{\mathsf{hypot}\left(c, d\right)}}
\] |
Final simplification89.2%
| Alternative 1 | |
|---|---|
| Accuracy | 88.5% |
| Cost | 33552 |
| Alternative 2 | |
|---|---|
| Accuracy | 90.6% |
| Cost | 27344 |
| Alternative 3 | |
|---|---|
| Accuracy | 86.7% |
| Cost | 20496 |
| Alternative 4 | |
|---|---|
| Accuracy | 84.7% |
| Cost | 14288 |
| Alternative 5 | |
|---|---|
| Accuracy | 81.0% |
| Cost | 1752 |
| Alternative 6 | |
|---|---|
| Accuracy | 74.5% |
| Cost | 1371 |
| Alternative 7 | |
|---|---|
| Accuracy | 74.5% |
| Cost | 1369 |
| Alternative 8 | |
|---|---|
| Accuracy | 74.4% |
| Cost | 1368 |
| Alternative 9 | |
|---|---|
| Accuracy | 74.5% |
| Cost | 1368 |
| Alternative 10 | |
|---|---|
| Accuracy | 74.3% |
| Cost | 1368 |
| Alternative 11 | |
|---|---|
| Accuracy | 75.4% |
| Cost | 1234 |
| Alternative 12 | |
|---|---|
| Accuracy | 75.4% |
| Cost | 1232 |
| Alternative 13 | |
|---|---|
| Accuracy | 75.1% |
| Cost | 1232 |
| Alternative 14 | |
|---|---|
| Accuracy | 74.9% |
| Cost | 1232 |
| Alternative 15 | |
|---|---|
| Accuracy | 69.4% |
| Cost | 841 |
| Alternative 16 | |
|---|---|
| Accuracy | 63.8% |
| Cost | 520 |
| Alternative 17 | |
|---|---|
| Accuracy | 46.0% |
| Cost | 457 |
| Alternative 18 | |
|---|---|
| Accuracy | 13.9% |
| Cost | 456 |
| Alternative 19 | |
|---|---|
| Accuracy | 8.3% |
| Cost | 192 |
herbie shell --seed 2023151
(FPCore (a b c d)
:name "Complex division, imag part"
:precision binary64
:herbie-target
(if (< (fabs d) (fabs c)) (/ (- b (* a (/ d c))) (+ c (* d (/ d c)))) (/ (+ (- a) (* b (/ c d))) (+ d (* c (/ c d)))))
(/ (- (* b c) (* a d)) (+ (* c c) (* d d))))