\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 r30566060 = x;
double r30566061 = y;
double r30566062 = z;
double r30566063 = r30566061 - r30566062;
double r30566064 = r30566060 * r30566063;
double r30566065 = r30566064 / r30566061;
return r30566065;
}
double f(double x, double y, double z) {
double r30566066 = x;
double r30566067 = -7.987697433686589e-172;
bool r30566068 = r30566066 <= r30566067;
double r30566069 = y;
double r30566070 = z;
double r30566071 = r30566069 - r30566070;
double r30566072 = r30566071 / r30566069;
double r30566073 = r30566066 * r30566072;
double r30566074 = 1.3183265886093979e-303;
bool r30566075 = r30566066 <= r30566074;
double r30566076 = r30566070 * r30566066;
double r30566077 = r30566076 / r30566069;
double r30566078 = r30566066 - r30566077;
double r30566079 = 1.0;
double r30566080 = r30566079 / r30566071;
double r30566081 = r30566080 * r30566069;
double r30566082 = r30566066 / r30566081;
double r30566083 = r30566075 ? r30566078 : r30566082;
double r30566084 = r30566068 ? r30566073 : r30566083;
return r30566084;
}




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))