\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;x \le -7.987697433686588590285611969201440389173 \cdot 10^{-172}:\\
\;\;\;\;x \cdot \frac{y - z}{y}\\
\mathbf{elif}\;x \le 1.318326588609397900170163534445278958933 \cdot 10^{-303}:\\
\;\;\;\;x - \frac{z \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{1}{y - z} \cdot y}\\
\end{array}double f(double x, double y, double z) {
double r28279674 = x;
double r28279675 = y;
double r28279676 = z;
double r28279677 = r28279675 - r28279676;
double r28279678 = r28279674 * r28279677;
double r28279679 = r28279678 / r28279675;
return r28279679;
}
double f(double x, double y, double z) {
double r28279680 = x;
double r28279681 = -7.987697433686589e-172;
bool r28279682 = r28279680 <= r28279681;
double r28279683 = y;
double r28279684 = z;
double r28279685 = r28279683 - r28279684;
double r28279686 = r28279685 / r28279683;
double r28279687 = r28279680 * r28279686;
double r28279688 = 1.3183265886093979e-303;
bool r28279689 = r28279680 <= r28279688;
double r28279690 = r28279684 * r28279680;
double r28279691 = r28279690 / r28279683;
double r28279692 = r28279680 - r28279691;
double r28279693 = 1.0;
double r28279694 = r28279693 / r28279685;
double r28279695 = r28279694 * r28279683;
double r28279696 = r28279680 / r28279695;
double r28279697 = r28279689 ? r28279692 : r28279696;
double r28279698 = r28279682 ? r28279687 : r28279697;
return r28279698;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.5 |
|---|---|
| Target | 2.9 |
| Herbie | 2.9 |
if x < -7.987697433686589e-172Initial program 14.3
rmApplied *-un-lft-identity14.3
Applied times-frac1.8
Simplified1.8
if -7.987697433686589e-172 < x < 1.3183265886093979e-303Initial program 8.3
Taylor expanded around 0 4.9
if 1.3183265886093979e-303 < x Initial program 12.3
rmApplied associate-/l*3.1
rmApplied div-inv3.3
Final simplification2.9
herbie shell --seed 2019172 +o rules:numerics
(FPCore (x y z)
:name "Diagrams.Backend.Cairo.Internal:setTexture from diagrams-cairo-1.3.0.3"
: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))