x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -1.057433920064963 \cdot 10^{133}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\
\mathbf{elif}\;\frac{y}{z} \le -1.0665637347194774 \cdot 10^{-221} \lor \neg \left(\frac{y}{z} \le 1.5828563463705101 \cdot 10^{-127}\right) \land \frac{y}{z} \le 2.5905951762285947 \cdot 10^{176}:\\
\;\;\;\;\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 r804280 = x;
double r804281 = y;
double r804282 = z;
double r804283 = r804281 / r804282;
double r804284 = t;
double r804285 = r804283 * r804284;
double r804286 = r804285 / r804284;
double r804287 = r804280 * r804286;
return r804287;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r804288 = y;
double r804289 = z;
double r804290 = r804288 / r804289;
double r804291 = -1.057433920064963e+133;
bool r804292 = r804290 <= r804291;
double r804293 = 1.0;
double r804294 = x;
double r804295 = r804294 * r804288;
double r804296 = r804289 / r804295;
double r804297 = r804293 / r804296;
double r804298 = -1.0665637347194774e-221;
bool r804299 = r804290 <= r804298;
double r804300 = 1.5828563463705101e-127;
bool r804301 = r804290 <= r804300;
double r804302 = !r804301;
double r804303 = 2.5905951762285947e+176;
bool r804304 = r804290 <= r804303;
bool r804305 = r804302 && r804304;
bool r804306 = r804299 || r804305;
double r804307 = r804289 / r804288;
double r804308 = r804294 / r804307;
double r804309 = r804295 / r804289;
double r804310 = r804306 ? r804308 : r804309;
double r804311 = r804292 ? r804297 : r804310;
return r804311;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 15.4 |
|---|---|
| Target | 1.5 |
| Herbie | 1.0 |
if (/ y z) < -1.057433920064963e+133Initial program 34.0
Simplified16.5
rmApplied *-un-lft-identity16.5
Applied associate-*l*16.5
Simplified4.0
rmApplied clear-num4.1
if -1.057433920064963e+133 < (/ y z) < -1.0665637347194774e-221 or 1.5828563463705101e-127 < (/ y z) < 2.5905951762285947e+176Initial program 6.8
Simplified0.2
rmApplied *-un-lft-identity0.2
Applied associate-*l*0.2
Simplified10.3
rmApplied associate-/l*0.2
if -1.0665637347194774e-221 < (/ y z) < 1.5828563463705101e-127 or 2.5905951762285947e+176 < (/ y z) Initial program 22.0
Simplified12.1
rmApplied *-un-lft-identity12.1
Applied associate-*l*12.1
Simplified1.2
Final simplification1.0
herbie shell --seed 2020042 +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)))