x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} = -\infty:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{1}{z}\\
\mathbf{elif}\;\frac{y}{z} \le -1.03192616381755189 \cdot 10^{-277}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le 7.34626099988 \cdot 10^{-313}:\\
\;\;\;\;{\left(\frac{x \cdot y}{z}\right)}^{1}\\
\mathbf{elif}\;\frac{y}{z} \le 2.1777827215712954 \cdot 10^{98}:\\
\;\;\;\;{\left(\frac{x}{\frac{z}{y}}\right)}^{1}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{x \cdot y}{z}\right)}^{1}\\
\end{array}double f(double x, double y, double z, double t) {
double r531009 = x;
double r531010 = y;
double r531011 = z;
double r531012 = r531010 / r531011;
double r531013 = t;
double r531014 = r531012 * r531013;
double r531015 = r531014 / r531013;
double r531016 = r531009 * r531015;
return r531016;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r531017 = y;
double r531018 = z;
double r531019 = r531017 / r531018;
double r531020 = -inf.0;
bool r531021 = r531019 <= r531020;
double r531022 = x;
double r531023 = r531022 * r531017;
double r531024 = 1.0;
double r531025 = r531024 / r531018;
double r531026 = r531023 * r531025;
double r531027 = -1.0319261638175519e-277;
bool r531028 = r531019 <= r531027;
double r531029 = r531022 * r531019;
double r531030 = 7.3462609998833e-313;
bool r531031 = r531019 <= r531030;
double r531032 = r531023 / r531018;
double r531033 = pow(r531032, r531024);
double r531034 = 2.1777827215712954e+98;
bool r531035 = r531019 <= r531034;
double r531036 = r531018 / r531017;
double r531037 = r531022 / r531036;
double r531038 = pow(r531037, r531024);
double r531039 = r531035 ? r531038 : r531033;
double r531040 = r531031 ? r531033 : r531039;
double r531041 = r531028 ? r531029 : r531040;
double r531042 = r531021 ? r531026 : r531041;
return r531042;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.8 |
|---|---|
| Target | 1.6 |
| Herbie | 0.8 |
if (/ y z) < -inf.0Initial program 64.0
Simplified64.0
rmApplied div-inv64.0
Applied associate-*r*0.3
if -inf.0 < (/ y z) < -1.0319261638175519e-277Initial program 11.1
Simplified0.2
if -1.0319261638175519e-277 < (/ y z) < 7.3462609998833e-313 or 2.1777827215712954e+98 < (/ y z) Initial program 23.4
Simplified16.6
rmApplied add-cube-cbrt16.9
Applied *-un-lft-identity16.9
Applied times-frac17.0
Applied associate-*r*4.1
Simplified4.1
rmApplied pow14.1
Applied pow14.1
Applied pow-prod-down4.1
Simplified2.0
if 7.3462609998833e-313 < (/ y z) < 2.1777827215712954e+98Initial program 8.2
Simplified0.2
rmApplied add-cube-cbrt1.2
Applied *-un-lft-identity1.2
Applied times-frac1.2
Applied associate-*r*6.1
Simplified6.1
rmApplied pow16.1
Applied pow16.1
Applied pow-prod-down6.1
Simplified8.1
rmApplied associate-/l*0.4
Final simplification0.8
herbie shell --seed 2020035 +o rules:numerics
(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)))