x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -1.167382686214397895425941397509630236779 \cdot 10^{231}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le -1.827587823355642407973457381841440310715 \cdot 10^{-156}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;\frac{y}{z} \le 1.053250369059781787110723173910298691639 \cdot 10^{-123}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;\frac{y}{z} \le 1.111565981439738552177075156972483526402 \cdot 10^{232}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\end{array}double f(double x, double y, double z, double t) {
double r30221332 = x;
double r30221333 = y;
double r30221334 = z;
double r30221335 = r30221333 / r30221334;
double r30221336 = t;
double r30221337 = r30221335 * r30221336;
double r30221338 = r30221337 / r30221336;
double r30221339 = r30221332 * r30221338;
return r30221339;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r30221340 = y;
double r30221341 = z;
double r30221342 = r30221340 / r30221341;
double r30221343 = -1.1673826862143979e+231;
bool r30221344 = r30221342 <= r30221343;
double r30221345 = x;
double r30221346 = r30221345 * r30221340;
double r30221347 = r30221346 / r30221341;
double r30221348 = -1.8275878233556424e-156;
bool r30221349 = r30221342 <= r30221348;
double r30221350 = r30221342 * r30221345;
double r30221351 = 1.0532503690597818e-123;
bool r30221352 = r30221342 <= r30221351;
double r30221353 = r30221345 / r30221341;
double r30221354 = r30221353 * r30221340;
double r30221355 = 1.1115659814397386e+232;
bool r30221356 = r30221342 <= r30221355;
double r30221357 = r30221356 ? r30221350 : r30221354;
double r30221358 = r30221352 ? r30221354 : r30221357;
double r30221359 = r30221349 ? r30221350 : r30221358;
double r30221360 = r30221344 ? r30221347 : r30221359;
return r30221360;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 15.1 |
|---|---|
| Target | 1.5 |
| Herbie | 0.7 |
if (/ y z) < -1.1673826862143979e+231Initial program 50.5
Simplified0.8
rmApplied *-un-lft-identity0.8
Applied add-cube-cbrt1.9
Applied times-frac1.9
Applied associate-*r*1.9
Simplified1.9
rmApplied associate-*r/1.9
Simplified0.7
if -1.1673826862143979e+231 < (/ y z) < -1.8275878233556424e-156 or 1.0532503690597818e-123 < (/ y z) < 1.1115659814397386e+232Initial program 8.2
Simplified11.2
rmApplied *-un-lft-identity11.2
Applied add-cube-cbrt12.0
Applied times-frac12.0
Applied associate-*r*9.1
Simplified9.1
rmApplied associate-*r/10.6
Simplified9.7
rmApplied *-un-lft-identity9.7
Applied times-frac0.3
Simplified0.3
if -1.8275878233556424e-156 < (/ y z) < 1.0532503690597818e-123 or 1.1115659814397386e+232 < (/ y z) Initial program 20.2
Simplified1.3
Final simplification0.7
herbie shell --seed 2019168
(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)))