x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;z \le -3.74083005502277 \cdot 10^{-271}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;z \le 3.761519737827246 \cdot 10^{-224}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;z \le 4.956742987442585 \cdot 10^{+22}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}double f(double x, double y, double z, double t) {
double r31278878 = x;
double r31278879 = y;
double r31278880 = z;
double r31278881 = r31278879 / r31278880;
double r31278882 = t;
double r31278883 = r31278881 * r31278882;
double r31278884 = r31278883 / r31278882;
double r31278885 = r31278878 * r31278884;
return r31278885;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r31278886 = z;
double r31278887 = -3.74083005502277e-271;
bool r31278888 = r31278886 <= r31278887;
double r31278889 = x;
double r31278890 = y;
double r31278891 = r31278886 / r31278890;
double r31278892 = r31278889 / r31278891;
double r31278893 = 3.761519737827246e-224;
bool r31278894 = r31278886 <= r31278893;
double r31278895 = r31278889 / r31278886;
double r31278896 = r31278890 * r31278895;
double r31278897 = 4.956742987442585e+22;
bool r31278898 = r31278886 <= r31278897;
double r31278899 = r31278889 * r31278890;
double r31278900 = r31278899 / r31278886;
double r31278901 = r31278898 ? r31278892 : r31278900;
double r31278902 = r31278894 ? r31278896 : r31278901;
double r31278903 = r31278888 ? r31278892 : r31278902;
return r31278903;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.1 |
|---|---|
| Target | 1.5 |
| Herbie | 6.1 |
if z < -3.74083005502277e-271 or 3.761519737827246e-224 < z < 4.956742987442585e+22Initial program 13.6
Simplified5.6
rmApplied add-cube-cbrt6.5
Applied *-un-lft-identity6.5
Applied times-frac6.5
Applied associate-*r*5.3
Simplified5.3
rmApplied *-un-lft-identity5.3
Applied associate-*l*5.3
Simplified5.3
if -3.74083005502277e-271 < z < 3.761519737827246e-224Initial program 21.6
Simplified14.2
if 4.956742987442585e+22 < z Initial program 13.4
Simplified5.5
rmApplied add-cube-cbrt6.1
Applied *-un-lft-identity6.1
Applied times-frac6.1
Applied associate-*r*4.9
Simplified4.9
rmApplied frac-times6.8
Simplified6.2
Final simplification6.1
herbie shell --seed 2019162
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, B"
: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)))