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}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\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 r25276231 = x;
double r25276232 = y;
double r25276233 = z;
double r25276234 = r25276232 / r25276233;
double r25276235 = t;
double r25276236 = r25276234 * r25276235;
double r25276237 = r25276236 / r25276235;
double r25276238 = r25276231 * r25276237;
return r25276238;
}
double f(double x, double y, double z, double __attribute__((unused)) t) {
double r25276239 = z;
double r25276240 = -5.456893094179094e-222;
bool r25276241 = r25276239 <= r25276240;
double r25276242 = x;
double r25276243 = y;
double r25276244 = r25276242 * r25276243;
double r25276245 = r25276244 / r25276239;
double r25276246 = -1.9981538016287333e-247;
bool r25276247 = r25276239 <= r25276246;
double r25276248 = r25276242 / r25276239;
double r25276249 = r25276243 * r25276248;
double r25276250 = 8.4476804615401e-193;
bool r25276251 = r25276239 <= r25276250;
double r25276252 = 1.2194421468439988e+120;
bool r25276253 = r25276239 <= r25276252;
double r25276254 = r25276239 / r25276242;
double r25276255 = r25276243 / r25276254;
double r25276256 = r25276253 ? r25276255 : r25276245;
double r25276257 = r25276251 ? r25276245 : r25276256;
double r25276258 = r25276247 ? r25276249 : r25276257;
double r25276259 = r25276241 ? r25276245 : r25276258;
return r25276259;
}




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-247Initial program 23.4
Simplified14.4
rmApplied associate-/l*13.8
rmApplied associate-/r/8.7
if 8.4476804615401e-193 < z < 1.2194421468439988e+120Initial program 14.4
Simplified4.5
rmApplied add-cube-cbrt5.4
Applied associate-/r*5.4
rmApplied *-un-lft-identity5.4
Applied cbrt-prod5.4
Applied *-un-lft-identity5.4
Applied times-frac5.4
Simplified5.4
Simplified3.7
Final simplification6.0
herbie shell --seed 2019174 +o rules:numerics
(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)))