\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t \le -1.5432952930330419 \cdot 10^{304} \lor \neg \left(x \cdot y - z \cdot t \le 1.97655688368822301 \cdot 10^{271}\right):\\
\;\;\;\;\frac{x}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{y}{\sqrt[3]{a}} - \frac{t}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{a}{x \cdot y - z \cdot t}}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (((double) (((double) (x * y)) - ((double) (z * t)))) / a));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((((double) (((double) (x * y)) - ((double) (z * t)))) <= -1.543295293033042e+304) || !(((double) (((double) (x * y)) - ((double) (z * t)))) <= 1.976556883688223e+271))) {
VAR = ((double) (((double) (((double) (x / ((double) (((double) cbrt(a)) * ((double) cbrt(a)))))) * ((double) (y / ((double) cbrt(a)))))) - ((double) (t / ((double) (a / z))))));
} else {
VAR = ((double) (1.0 / ((double) (a / ((double) (((double) (x * y)) - ((double) (z * t))))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 8.0 |
|---|---|
| Target | 6.2 |
| Herbie | 1.0 |
if (- (* x y) (* z t)) < -1.5432952930330419e304 or 1.97655688368822301e271 < (- (* x y) (* z t)) Initial program 54.4
rmApplied div-sub54.4
Simplified54.4
rmApplied associate-/l*28.2
rmApplied add-cube-cbrt28.3
Applied times-frac0.8
if -1.5432952930330419e304 < (- (* x y) (* z t)) < 1.97655688368822301e271Initial program 0.8
rmApplied clear-num1.1
Final simplification1.0
herbie shell --seed 2020150
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:herbie-target
(if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))
(/ (- (* x y) (* z t)) a))