\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t \le -1.0852157021331296 \cdot 10^{231} \lor \neg \left(x \cdot y - z \cdot t \le 6.3521234323903313 \cdot 10^{199}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{1}, \frac{y}{a}, -\frac{z}{a} \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{x \cdot y}{a}} \cdot \sqrt[3]{\frac{x \cdot y}{a}}, \sqrt[3]{\frac{x \cdot y}{a}}, -\frac{t \cdot z}{a}\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r961497 = x;
double r961498 = y;
double r961499 = r961497 * r961498;
double r961500 = z;
double r961501 = t;
double r961502 = r961500 * r961501;
double r961503 = r961499 - r961502;
double r961504 = a;
double r961505 = r961503 / r961504;
return r961505;
}
double f(double x, double y, double z, double t, double a) {
double r961506 = x;
double r961507 = y;
double r961508 = r961506 * r961507;
double r961509 = z;
double r961510 = t;
double r961511 = r961509 * r961510;
double r961512 = r961508 - r961511;
double r961513 = -1.0852157021331296e+231;
bool r961514 = r961512 <= r961513;
double r961515 = 6.352123432390331e+199;
bool r961516 = r961512 <= r961515;
double r961517 = !r961516;
bool r961518 = r961514 || r961517;
double r961519 = 1.0;
double r961520 = r961506 / r961519;
double r961521 = a;
double r961522 = r961507 / r961521;
double r961523 = r961509 / r961521;
double r961524 = r961523 * r961510;
double r961525 = -r961524;
double r961526 = fma(r961520, r961522, r961525);
double r961527 = r961508 / r961521;
double r961528 = cbrt(r961527);
double r961529 = r961528 * r961528;
double r961530 = r961510 * r961509;
double r961531 = r961530 / r961521;
double r961532 = -r961531;
double r961533 = fma(r961529, r961528, r961532);
double r961534 = r961518 ? r961526 : r961533;
return r961534;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 7.9 |
|---|---|
| Target | 5.9 |
| Herbie | 1.2 |
if (- (* x y) (* z t)) < -1.0852157021331296e+231 or 6.352123432390331e+199 < (- (* x y) (* z t)) Initial program 32.1
rmApplied div-sub32.1
Simplified32.1
rmApplied *-un-lft-identity32.1
Applied times-frac17.2
Applied fma-neg17.2
rmApplied add-cube-cbrt17.4
Applied times-frac1.4
Taylor expanded around 0 17.2
Simplified0.9
if -1.0852157021331296e+231 < (- (* x y) (* z t)) < 6.352123432390331e+199Initial program 0.8
rmApplied div-sub0.8
Simplified0.8
rmApplied add-cube-cbrt1.3
Applied fma-neg1.3
Final simplification1.2
herbie shell --seed 2020020 +o rules:numerics
(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))