\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t = -\infty \lor \neg \left(x \cdot y - z \cdot t \le 8.625599261974259545830604107555064080357 \cdot 10^{293}\right):\\
\;\;\;\;\left(-t \cdot \frac{z}{a}\right) + \frac{y \cdot \frac{x}{\sqrt[3]{a} \cdot \sqrt[3]{a}}}{{\left(\sqrt[3]{\sqrt[3]{a}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - t \cdot z}{a}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r556115 = x;
double r556116 = y;
double r556117 = r556115 * r556116;
double r556118 = z;
double r556119 = t;
double r556120 = r556118 * r556119;
double r556121 = r556117 - r556120;
double r556122 = a;
double r556123 = r556121 / r556122;
return r556123;
}
double f(double x, double y, double z, double t, double a) {
double r556124 = x;
double r556125 = y;
double r556126 = r556124 * r556125;
double r556127 = z;
double r556128 = t;
double r556129 = r556127 * r556128;
double r556130 = r556126 - r556129;
double r556131 = -inf.0;
bool r556132 = r556130 <= r556131;
double r556133 = 8.62559926197426e+293;
bool r556134 = r556130 <= r556133;
double r556135 = !r556134;
bool r556136 = r556132 || r556135;
double r556137 = a;
double r556138 = r556127 / r556137;
double r556139 = r556128 * r556138;
double r556140 = -r556139;
double r556141 = cbrt(r556137);
double r556142 = r556141 * r556141;
double r556143 = r556124 / r556142;
double r556144 = r556125 * r556143;
double r556145 = cbrt(r556141);
double r556146 = 3.0;
double r556147 = pow(r556145, r556146);
double r556148 = r556144 / r556147;
double r556149 = r556140 + r556148;
double r556150 = r556128 * r556127;
double r556151 = r556126 - r556150;
double r556152 = r556151 / r556137;
double r556153 = r556136 ? r556149 : r556152;
return r556153;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.7 |
|---|---|
| Target | 6.5 |
| Herbie | 1.6 |
if (- (* x y) (* z t)) < -inf.0Initial program 64.0
rmApplied div-sub64.0
Simplified64.0
rmApplied add-cube-cbrt64.0
Applied times-frac35.4
rmApplied *-un-lft-identity35.4
Applied times-frac0.8
Simplified0.8
rmApplied add-cube-cbrt0.9
if -inf.0 < (- (* x y) (* z t)) < 8.62559926197426e+293Initial program 0.8
rmApplied div-sub0.8
Simplified0.8
rmApplied div-inv0.9
Applied div-inv0.9
Applied distribute-rgt-out--0.9
if 8.62559926197426e+293 < (- (* x y) (* z t)) Initial program 56.8
rmApplied div-sub56.8
Simplified56.8
rmApplied add-cube-cbrt56.9
Applied times-frac33.7
rmApplied *-un-lft-identity33.7
Applied times-frac0.7
Simplified0.7
rmApplied add-cube-cbrt0.9
Applied *-un-lft-identity0.9
Applied times-frac0.9
Applied associate-*r*0.9
Simplified0.9
Final simplification1.6
herbie shell --seed 2019297
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:herbie-target
(if (< z -2.46868496869954822e170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.30983112197837121e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))
(/ (- (* x y) (* z t)) a))