\frac{x \cdot \left(y + z\right)}{z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y + z\right)}{z} = -\infty:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + 1\right)\\
\mathbf{elif}\;\frac{x \cdot \left(y + z\right)}{z} \le -3.58734073562936087 \cdot 10^{-50}:\\
\;\;\;\;\frac{1}{z} \cdot \left(x \cdot \left(y + z\right)\right)\\
\mathbf{elif}\;\frac{x \cdot \left(y + z\right)}{z} \le 1.2688434278768279 \cdot 10^{79}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + 1\right)\\
\mathbf{elif}\;\frac{x \cdot \left(y + z\right)}{z} \le 1.26550784375647793 \cdot 10^{293}:\\
\;\;\;\;\frac{1}{z} \cdot \left(x \cdot \left(y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y + z}}\\
\end{array}double f(double x, double y, double z) {
double r442296 = x;
double r442297 = y;
double r442298 = z;
double r442299 = r442297 + r442298;
double r442300 = r442296 * r442299;
double r442301 = r442300 / r442298;
return r442301;
}
double f(double x, double y, double z) {
double r442302 = x;
double r442303 = y;
double r442304 = z;
double r442305 = r442303 + r442304;
double r442306 = r442302 * r442305;
double r442307 = r442306 / r442304;
double r442308 = -inf.0;
bool r442309 = r442307 <= r442308;
double r442310 = r442303 / r442304;
double r442311 = 1.0;
double r442312 = r442310 + r442311;
double r442313 = r442302 * r442312;
double r442314 = -3.587340735629361e-50;
bool r442315 = r442307 <= r442314;
double r442316 = r442311 / r442304;
double r442317 = r442316 * r442306;
double r442318 = 1.2688434278768279e+79;
bool r442319 = r442307 <= r442318;
double r442320 = 1.265507843756478e+293;
bool r442321 = r442307 <= r442320;
double r442322 = r442304 / r442305;
double r442323 = r442302 / r442322;
double r442324 = r442321 ? r442317 : r442323;
double r442325 = r442319 ? r442313 : r442324;
double r442326 = r442315 ? r442317 : r442325;
double r442327 = r442309 ? r442313 : r442326;
return r442327;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.1 |
|---|---|
| Target | 3.0 |
| Herbie | 0.5 |
if (/ (* x (+ y z)) z) < -inf.0 or -3.587340735629361e-50 < (/ (* x (+ y z)) z) < 1.2688434278768279e+79Initial program 14.1
rmApplied *-un-lft-identity14.1
Applied times-frac0.4
Simplified0.4
Taylor expanded around 0 0.4
if -inf.0 < (/ (* x (+ y z)) z) < -3.587340735629361e-50 or 1.2688434278768279e+79 < (/ (* x (+ y z)) z) < 1.265507843756478e+293Initial program 0.3
rmApplied associate-/l*6.7
rmApplied div-inv6.8
Applied *-un-lft-identity6.8
Applied times-frac0.3
Simplified0.4
if 1.265507843756478e+293 < (/ (* x (+ y z)) z) Initial program 57.5
rmApplied associate-/l*1.5
Final simplification0.5
herbie shell --seed 2020021
(FPCore (x y z)
:name "Numeric.SpecFunctions:choose from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(/ x (/ z (+ y z)))
(/ (* x (+ y z)) z))