x \cdot \frac{\frac{y}{z} \cdot t}{t}\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -2.0989985598366828 \cdot 10^{-236}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;\frac{y}{z} \le 4.4303806781760739 \cdot 10^{-235}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;\frac{y}{z} \le 6.4284572525223976 \cdot 10^{303}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{1}{z}\\
\end{array}double f(double x, double y, double z, double t) {
double r511261 = x;
double r511262 = y;
double r511263 = z;
double r511264 = r511262 / r511263;
double r511265 = t;
double r511266 = r511264 * r511265;
double r511267 = r511266 / r511265;
double r511268 = r511261 * r511267;
return r511268;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r511269 = y;
double r511270 = z;
double r511271 = r511269 / r511270;
double r511272 = -2.098998559836683e-236;
bool r511273 = r511271 <= r511272;
double r511274 = x;
double r511275 = r511270 / r511269;
double r511276 = r511274 / r511275;
double r511277 = 4.430380678176074e-235;
bool r511278 = r511271 <= r511277;
double r511279 = r511274 * r511269;
double r511280 = r511279 / r511270;
double r511281 = 6.428457252522398e+303;
bool r511282 = r511271 <= r511281;
double r511283 = 1.0;
double r511284 = r511283 / r511270;
double r511285 = r511279 * r511284;
double r511286 = r511282 ? r511276 : r511285;
double r511287 = r511278 ? r511280 : r511286;
double r511288 = r511273 ? r511276 : r511287;
return r511288;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.8 |
|---|---|
| Target | 1.5 |
| Herbie | 1.7 |
if (/ y z) < -2.098998559836683e-236 or 4.430380678176074e-235 < (/ y z) < 6.428457252522398e+303Initial program 11.8
Simplified2.3
rmApplied add-cube-cbrt3.3
Applied *-un-lft-identity3.3
Applied times-frac3.3
Applied associate-*r*5.8
Simplified5.8
Taylor expanded around 0 8.2
rmApplied associate-/l*2.2
if -2.098998559836683e-236 < (/ y z) < 4.430380678176074e-235Initial program 18.7
Simplified12.1
rmApplied add-cube-cbrt12.3
Applied *-un-lft-identity12.3
Applied times-frac12.3
Applied associate-*r*2.9
Simplified2.9
Taylor expanded around 0 0.4
if 6.428457252522398e+303 < (/ y z) Initial program 64.0
Simplified61.9
rmApplied div-inv61.9
Applied associate-*r*0.3
Final simplification1.7
herbie shell --seed 2020045
(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)))