\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;z \le -1.8688621848367084 \cdot 10^{248}:\\
\;\;\;\;x - \frac{x \cdot z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 \cdot \frac{y}{y - z}}\\
\end{array}double f(double x, double y, double z) {
double r592393 = x;
double r592394 = y;
double r592395 = z;
double r592396 = r592394 - r592395;
double r592397 = r592393 * r592396;
double r592398 = r592397 / r592394;
return r592398;
}
double f(double x, double y, double z) {
double r592399 = z;
double r592400 = -1.8688621848367084e+248;
bool r592401 = r592399 <= r592400;
double r592402 = x;
double r592403 = r592402 * r592399;
double r592404 = y;
double r592405 = r592403 / r592404;
double r592406 = r592402 - r592405;
double r592407 = 1.0;
double r592408 = r592404 - r592399;
double r592409 = r592404 / r592408;
double r592410 = r592407 * r592409;
double r592411 = r592402 / r592410;
double r592412 = r592401 ? r592406 : r592411;
return r592412;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.7 |
|---|---|
| Target | 3.0 |
| Herbie | 2.9 |
if z < -1.8688621848367084e+248Initial program 13.5
rmApplied associate-/l*11.5
Taylor expanded around 0 13.0
if -1.8688621848367084e+248 < z Initial program 12.7
rmApplied associate-/l*2.5
rmApplied *-un-lft-identity2.5
Applied *-un-lft-identity2.5
Applied times-frac2.5
Simplified2.5
Final simplification2.9
herbie shell --seed 2020089
(FPCore (x y z)
:name "Diagrams.Backend.Cairo.Internal:setTexture from diagrams-cairo-1.3.0.3"
:precision binary64
:herbie-target
(if (< z -2.060202331921739e+104) (- x (/ (* z x) y)) (if (< z 1.6939766013828526e+213) (/ x (/ y (- y z))) (* (- y z) (/ x y))))
(/ (* x (- y z)) y))