x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -2.0989985598366828 \cdot 10^{-236}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;\frac{y}{z} \le 4.4303806781760739 \cdot 10^{-235}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le 6.4284572525223976 \cdot 10^{303}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\
\end{array}double f(double x, double y, double z, double t) {
double r618809 = x;
double r618810 = y;
double r618811 = z;
double r618812 = r618810 / r618811;
double r618813 = t;
double r618814 = r618812 * r618813;
double r618815 = r618814 / r618813;
double r618816 = r618809 * r618815;
return r618816;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r618817 = y;
double r618818 = z;
double r618819 = r618817 / r618818;
double r618820 = -2.098998559836683e-236;
bool r618821 = r618819 <= r618820;
double r618822 = x;
double r618823 = r618818 / r618817;
double r618824 = r618822 / r618823;
double r618825 = 4.430380678176074e-235;
bool r618826 = r618819 <= r618825;
double r618827 = r618822 * r618817;
double r618828 = r618827 / r618818;
double r618829 = 6.428457252522398e+303;
bool r618830 = r618819 <= r618829;
double r618831 = 1.0;
double r618832 = r618818 / r618827;
double r618833 = r618831 / r618832;
double r618834 = r618830 ? r618824 : r618833;
double r618835 = r618826 ? r618828 : r618834;
double r618836 = r618821 ? r618824 : r618835;
return r618836;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.8 |
|---|---|
| Target | 1.5 |
| Herbie | 1.7 |
if (/ y z) < -2.098998559836683e-236 or 4.430380678176074e-235 < (/ y z) < 6.428457252522398e+303Initial program 11.8
Simplified2.3
rmApplied add-cube-cbrt3.3
Applied *-un-lft-identity3.3
Applied times-frac3.3
Applied associate-*r*5.8
Simplified5.8
rmApplied add-cube-cbrt6.1
Taylor expanded around 0 8.2
rmApplied associate-/l*2.2
if -2.098998559836683e-236 < (/ y z) < 4.430380678176074e-235Initial program 18.7
Simplified12.1
rmApplied add-cube-cbrt12.3
Applied *-un-lft-identity12.3
Applied times-frac12.3
Applied associate-*r*2.9
Simplified2.9
rmApplied add-cube-cbrt3.0
Taylor expanded around 0 0.4
if 6.428457252522398e+303 < (/ y z) Initial program 64.0
Simplified61.9
rmApplied add-cube-cbrt62.0
Applied *-un-lft-identity62.0
Applied times-frac62.0
Applied associate-*r*13.7
Simplified13.7
rmApplied add-cube-cbrt14.1
Taylor expanded around 0 0.2
rmApplied clear-num0.4
Final simplification1.7
herbie shell --seed 2020045
(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)))