x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -6.122731566035475311671418161909773301552 \cdot 10^{157}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\
\mathbf{elif}\;\frac{y}{z} \le -2.242439350440375267697031348628742827796 \cdot 10^{-179}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le 5.129556799950046333853278890491110988102 \cdot 10^{-271}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le 1.795095217187765936797771641264103283314 \cdot 10^{286}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}double f(double x, double y, double z, double t) {
double r599711 = x;
double r599712 = y;
double r599713 = z;
double r599714 = r599712 / r599713;
double r599715 = t;
double r599716 = r599714 * r599715;
double r599717 = r599716 / r599715;
double r599718 = r599711 * r599717;
return r599718;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r599719 = y;
double r599720 = z;
double r599721 = r599719 / r599720;
double r599722 = -6.122731566035475e+157;
bool r599723 = r599721 <= r599722;
double r599724 = 1.0;
double r599725 = x;
double r599726 = r599725 * r599719;
double r599727 = r599720 / r599726;
double r599728 = r599724 / r599727;
double r599729 = -2.2424393504403753e-179;
bool r599730 = r599721 <= r599729;
double r599731 = r599725 * r599721;
double r599732 = 5.129556799950046e-271;
bool r599733 = r599721 <= r599732;
double r599734 = r599726 / r599720;
double r599735 = 1.795095217187766e+286;
bool r599736 = r599721 <= r599735;
double r599737 = r599736 ? r599731 : r599734;
double r599738 = r599733 ? r599734 : r599737;
double r599739 = r599730 ? r599731 : r599738;
double r599740 = r599723 ? r599728 : r599739;
return r599740;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.5 |
|---|---|
| Target | 1.4 |
| Herbie | 0.5 |
if (/ y z) < -6.122731566035475e+157Initial program 33.9
Simplified18.6
rmApplied *-un-lft-identity18.6
Applied add-cube-cbrt19.4
Applied times-frac19.4
Applied associate-*r*6.1
Simplified6.1
rmApplied add-cube-cbrt6.4
rmApplied associate-*r/3.6
Simplified2.3
rmApplied clear-num2.4
if -6.122731566035475e+157 < (/ y z) < -2.2424393504403753e-179 or 5.129556799950046e-271 < (/ y z) < 1.795095217187766e+286Initial program 9.0
Simplified0.2
if -2.2424393504403753e-179 < (/ y z) < 5.129556799950046e-271 or 1.795095217187766e+286 < (/ y z) Initial program 21.5
Simplified15.3
rmApplied *-un-lft-identity15.3
Applied add-cube-cbrt15.6
Applied times-frac15.6
Applied associate-*r*3.8
Simplified3.8
rmApplied add-cube-cbrt4.0
rmApplied associate-*r/1.3
Simplified0.6
Final simplification0.5
herbie shell --seed 2019354
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, B"
:precision binary64
:herbie-target
(if (< (/ (* (/ y z) t) t) -1.20672205123045e+245) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) -5.907522236933906e-275) (* x (/ y z)) (if (< (/ (* (/ y z) t) t) 5.658954423153415e-65) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) 2.0087180502407133e+217) (* x (/ y z)) (/ (* y x) z)))))
(* x (/ (* (/ y z) t) t)))