\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t \le -9.286883594970578 \cdot 10^{231}:\\
\;\;\;\;y \cdot \frac{x}{a} - \frac{z}{\frac{a}{t}}\\
\mathbf{elif}\;x \cdot y - z \cdot t \le -1.25866305328327661 \cdot 10^{-272}:\\
\;\;\;\;\frac{1}{\frac{a}{x \cdot y - z \cdot t}}\\
\mathbf{elif}\;x \cdot y - z \cdot t \le 3.5698267769368085 \cdot 10^{-11}:\\
\;\;\;\;\left(y \cdot \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{a} \cdot \sqrt[3]{a}}\right) \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{a}} - z \cdot \frac{t}{a}\\
\mathbf{elif}\;x \cdot y - z \cdot t \le 1.17006433035619661 \cdot 10^{192}:\\
\;\;\;\;\frac{1}{\frac{a}{x \cdot y - z \cdot t}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a} - \frac{z}{\frac{a}{t}}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r883113 = x;
double r883114 = y;
double r883115 = r883113 * r883114;
double r883116 = z;
double r883117 = t;
double r883118 = r883116 * r883117;
double r883119 = r883115 - r883118;
double r883120 = a;
double r883121 = r883119 / r883120;
return r883121;
}
double f(double x, double y, double z, double t, double a) {
double r883122 = x;
double r883123 = y;
double r883124 = r883122 * r883123;
double r883125 = z;
double r883126 = t;
double r883127 = r883125 * r883126;
double r883128 = r883124 - r883127;
double r883129 = -9.286883594970578e+231;
bool r883130 = r883128 <= r883129;
double r883131 = a;
double r883132 = r883122 / r883131;
double r883133 = r883123 * r883132;
double r883134 = r883131 / r883126;
double r883135 = r883125 / r883134;
double r883136 = r883133 - r883135;
double r883137 = -1.2586630532832766e-272;
bool r883138 = r883128 <= r883137;
double r883139 = 1.0;
double r883140 = r883131 / r883128;
double r883141 = r883139 / r883140;
double r883142 = 3.5698267769368085e-11;
bool r883143 = r883128 <= r883142;
double r883144 = cbrt(r883122);
double r883145 = r883144 * r883144;
double r883146 = cbrt(r883131);
double r883147 = r883146 * r883146;
double r883148 = r883145 / r883147;
double r883149 = r883123 * r883148;
double r883150 = r883144 / r883146;
double r883151 = r883149 * r883150;
double r883152 = r883126 / r883131;
double r883153 = r883125 * r883152;
double r883154 = r883151 - r883153;
double r883155 = 1.1700643303561966e+192;
bool r883156 = r883128 <= r883155;
double r883157 = r883156 ? r883141 : r883136;
double r883158 = r883143 ? r883154 : r883157;
double r883159 = r883138 ? r883141 : r883158;
double r883160 = r883130 ? r883136 : r883159;
return r883160;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.9 |
|---|---|
| Target | 6.0 |
| Herbie | 1.4 |
if (- (* x y) (* z t)) < -9.286883594970578e+231 or 1.1700643303561966e+192 < (- (* x y) (* z t)) Initial program 30.8
rmApplied div-sub30.8
Simplified17.6
Simplified17.6
rmApplied add-cube-cbrt17.9
Applied associate-/r*17.9
Simplified4.9
rmApplied associate-/l*1.7
Simplified1.1
if -9.286883594970578e+231 < (- (* x y) (* z t)) < -1.2586630532832766e-272 or 3.5698267769368085e-11 < (- (* x y) (* z t)) < 1.1700643303561966e+192Initial program 0.3
rmApplied clear-num0.5
if -1.2586630532832766e-272 < (- (* x y) (* z t)) < 3.5698267769368085e-11Initial program 3.8
rmApplied div-sub3.8
Simplified5.9
Simplified5.9
rmApplied add-cube-cbrt6.2
Applied associate-/r*6.2
Simplified6.4
rmApplied *-un-lft-identity6.4
Applied cbrt-prod6.4
Applied times-frac7.5
Simplified7.5
Simplified7.1
rmApplied add-cube-cbrt7.5
Applied add-cube-cbrt7.6
Applied times-frac7.6
Applied associate-*r*4.5
Final simplification1.4
herbie shell --seed 2020047 +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))