\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;x \le -6.2854619819908728 \cdot 10^{-166}:\\
\;\;\;\;x \cdot \frac{y - z}{y}\\
\mathbf{elif}\;x \le 6.95759694615908471 \cdot 10^{-203}:\\
\;\;\;\;\frac{1}{y} \cdot \left(x \cdot \left(y - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{y}{y - z}}{x}}\\
\end{array}double f(double x, double y, double z) {
double r772146 = x;
double r772147 = y;
double r772148 = z;
double r772149 = r772147 - r772148;
double r772150 = r772146 * r772149;
double r772151 = r772150 / r772147;
return r772151;
}
double f(double x, double y, double z) {
double r772152 = x;
double r772153 = -6.285461981990873e-166;
bool r772154 = r772152 <= r772153;
double r772155 = y;
double r772156 = z;
double r772157 = r772155 - r772156;
double r772158 = r772157 / r772155;
double r772159 = r772152 * r772158;
double r772160 = 6.957596946159085e-203;
bool r772161 = r772152 <= r772160;
double r772162 = 1.0;
double r772163 = r772162 / r772155;
double r772164 = r772152 * r772157;
double r772165 = r772163 * r772164;
double r772166 = r772155 / r772157;
double r772167 = r772166 / r772152;
double r772168 = r772162 / r772167;
double r772169 = r772161 ? r772165 : r772168;
double r772170 = r772154 ? r772159 : r772169;
return r772170;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.4 |
|---|---|
| Target | 3.2 |
| Herbie | 3.5 |
if x < -6.285461981990873e-166Initial program 14.2
rmApplied *-un-lft-identity14.2
Applied times-frac1.7
Simplified1.7
if -6.285461981990873e-166 < x < 6.957596946159085e-203Initial program 8.4
rmApplied associate-/l*7.3
rmApplied div-inv7.4
Applied *-un-lft-identity7.4
Applied times-frac8.4
Simplified8.5
if 6.957596946159085e-203 < x Initial program 13.1
rmApplied associate-/l*2.2
rmApplied clear-num2.3
Final simplification3.5
herbie shell --seed 2020021 +o rules:numerics
(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))