x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;z \le -5.456893094179093804320322909204701959778 \cdot 10^{-222}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;z \le -1.998153801628733335171500404420370674566 \cdot 10^{-247}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;z \le 8.447680461540099603836085647567339379828 \cdot 10^{-193}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;z \le 1.21944214684399880068881121045408236628 \cdot 10^{120}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}double f(double x, double y, double z, double t) {
double r29883528 = x;
double r29883529 = y;
double r29883530 = z;
double r29883531 = r29883529 / r29883530;
double r29883532 = t;
double r29883533 = r29883531 * r29883532;
double r29883534 = r29883533 / r29883532;
double r29883535 = r29883528 * r29883534;
return r29883535;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r29883536 = z;
double r29883537 = -5.456893094179094e-222;
bool r29883538 = r29883536 <= r29883537;
double r29883539 = x;
double r29883540 = y;
double r29883541 = r29883539 * r29883540;
double r29883542 = r29883541 / r29883536;
double r29883543 = -1.9981538016287333e-247;
bool r29883544 = r29883536 <= r29883543;
double r29883545 = r29883536 / r29883539;
double r29883546 = r29883540 / r29883545;
double r29883547 = 8.4476804615401e-193;
bool r29883548 = r29883536 <= r29883547;
double r29883549 = 1.2194421468439988e+120;
bool r29883550 = r29883536 <= r29883549;
double r29883551 = r29883550 ? r29883546 : r29883542;
double r29883552 = r29883548 ? r29883542 : r29883551;
double r29883553 = r29883544 ? r29883546 : r29883552;
double r29883554 = r29883538 ? r29883542 : r29883553;
return r29883554;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 15.1 |
|---|---|
| Target | 1.8 |
| Herbie | 6.0 |
if z < -5.456893094179094e-222 or -1.9981538016287333e-247 < z < 8.4476804615401e-193 or 1.2194421468439988e+120 < z Initial program 15.2
Simplified6.7
if -5.456893094179094e-222 < z < -1.9981538016287333e-247 or 8.4476804615401e-193 < z < 1.2194421468439988e+120Initial program 14.8
Simplified5.0
rmApplied add-cube-cbrt5.9
Applied associate-/r*5.9
rmApplied *-un-lft-identity5.9
Applied cbrt-prod5.9
Applied *-un-lft-identity5.9
Applied times-frac5.9
Simplified5.9
Simplified3.9
Final simplification6.0
herbie shell --seed 2019174
(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)))