\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t \le -2.3081193531529197 \cdot 10^{92} \lor \neg \left(x \cdot y - z \cdot t \le 3.38424699368821546 \cdot 10^{194}\right):\\
\;\;\;\;x \cdot \frac{y}{a} - \frac{1}{\frac{\frac{a}{z}}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\sqrt[3]{x \cdot y - z \cdot t} \cdot \sqrt[3]{x \cdot y - z \cdot t}\right) \cdot \sqrt[3]{x \cdot y - z \cdot t}}{a}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r731292 = x;
double r731293 = y;
double r731294 = r731292 * r731293;
double r731295 = z;
double r731296 = t;
double r731297 = r731295 * r731296;
double r731298 = r731294 - r731297;
double r731299 = a;
double r731300 = r731298 / r731299;
return r731300;
}
double f(double x, double y, double z, double t, double a) {
double r731301 = x;
double r731302 = y;
double r731303 = r731301 * r731302;
double r731304 = z;
double r731305 = t;
double r731306 = r731304 * r731305;
double r731307 = r731303 - r731306;
double r731308 = -2.3081193531529197e+92;
bool r731309 = r731307 <= r731308;
double r731310 = 3.3842469936882155e+194;
bool r731311 = r731307 <= r731310;
double r731312 = !r731311;
bool r731313 = r731309 || r731312;
double r731314 = a;
double r731315 = r731302 / r731314;
double r731316 = r731301 * r731315;
double r731317 = 1.0;
double r731318 = r731314 / r731304;
double r731319 = r731318 / r731305;
double r731320 = r731317 / r731319;
double r731321 = r731316 - r731320;
double r731322 = cbrt(r731307);
double r731323 = r731322 * r731322;
double r731324 = r731323 * r731322;
double r731325 = r731324 / r731314;
double r731326 = r731313 ? r731321 : r731325;
return r731326;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.4 |
|---|---|
| Target | 6.0 |
| Herbie | 2.5 |
if (- (* x y) (* z t)) < -2.3081193531529197e+92 or 3.3842469936882155e+194 < (- (* x y) (* z t)) Initial program 19.5
rmApplied div-sub19.5
Simplified19.5
rmApplied associate-/l*12.8
rmApplied *-un-lft-identity12.8
Applied times-frac3.6
Simplified3.6
rmApplied clear-num3.7
if -2.3081193531529197e+92 < (- (* x y) (* z t)) < 3.3842469936882155e+194Initial program 0.9
rmApplied add-cube-cbrt1.9
Final simplification2.5
herbie shell --seed 2020003
(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))