\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;x \le -1.8543074289294527 \cdot 10^{47}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{y}\right)\\
\mathbf{elif}\;x \le -1.95697399262548232 \cdot 10^{-305}:\\
\;\;\;\;x + \left(-\frac{x \cdot z}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{y - z}}\\
\end{array}double f(double x, double y, double z) {
double r1341076 = x;
double r1341077 = y;
double r1341078 = z;
double r1341079 = r1341077 - r1341078;
double r1341080 = r1341076 * r1341079;
double r1341081 = r1341080 / r1341077;
return r1341081;
}
double f(double x, double y, double z) {
double r1341082 = x;
double r1341083 = -1.8543074289294527e+47;
bool r1341084 = r1341082 <= r1341083;
double r1341085 = 1.0;
double r1341086 = z;
double r1341087 = y;
double r1341088 = r1341086 / r1341087;
double r1341089 = r1341085 - r1341088;
double r1341090 = r1341082 * r1341089;
double r1341091 = -1.9569739926254823e-305;
bool r1341092 = r1341082 <= r1341091;
double r1341093 = r1341082 * r1341086;
double r1341094 = r1341093 / r1341087;
double r1341095 = -r1341094;
double r1341096 = r1341082 + r1341095;
double r1341097 = r1341087 - r1341086;
double r1341098 = r1341087 / r1341097;
double r1341099 = r1341082 / r1341098;
double r1341100 = r1341092 ? r1341096 : r1341099;
double r1341101 = r1341084 ? r1341090 : r1341100;
return r1341101;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 13.0 |
|---|---|
| Target | 2.9 |
| Herbie | 2.3 |
if x < -1.8543074289294527e+47Initial program 27.0
rmApplied *-un-lft-identity27.0
Applied times-frac0.1
Simplified0.1
Simplified0.1
if -1.8543074289294527e+47 < x < -1.9569739926254823e-305Initial program 4.8
rmApplied *-un-lft-identity4.8
Applied times-frac4.4
Simplified4.4
Simplified4.4
rmApplied sub-neg4.4
Applied distribute-lft-in4.4
Simplified4.4
Simplified2.6
if -1.9569739926254823e-305 < x Initial program 13.2
rmApplied associate-/l*2.8
Final simplification2.3
herbie shell --seed 2020047
(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))