\frac{\left(x \cdot 2.0\right) \cdot y}{x - y}\begin{array}{l}
\mathbf{if}\;x \le -57238629659.918236:\\
\;\;\;\;\frac{2.0 \cdot x}{x - y} \cdot y\\
\mathbf{elif}\;x \le 1.0217193971332764 \cdot 10^{-140}:\\
\;\;\;\;\frac{2.0 \cdot x}{\frac{x - y}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2.0 \cdot x}{x - y} \cdot y\\
\end{array}double f(double x, double y) {
double r22638193 = x;
double r22638194 = 2.0;
double r22638195 = r22638193 * r22638194;
double r22638196 = y;
double r22638197 = r22638195 * r22638196;
double r22638198 = r22638193 - r22638196;
double r22638199 = r22638197 / r22638198;
return r22638199;
}
double f(double x, double y) {
double r22638200 = x;
double r22638201 = -57238629659.918236;
bool r22638202 = r22638200 <= r22638201;
double r22638203 = 2.0;
double r22638204 = r22638203 * r22638200;
double r22638205 = y;
double r22638206 = r22638200 - r22638205;
double r22638207 = r22638204 / r22638206;
double r22638208 = r22638207 * r22638205;
double r22638209 = 1.0217193971332764e-140;
bool r22638210 = r22638200 <= r22638209;
double r22638211 = r22638206 / r22638205;
double r22638212 = r22638204 / r22638211;
double r22638213 = r22638210 ? r22638212 : r22638208;
double r22638214 = r22638202 ? r22638208 : r22638213;
return r22638214;
}




Bits error versus x




Bits error versus y
Results
| Original | 14.2 |
|---|---|
| Target | 0.4 |
| Herbie | 0.8 |
if x < -57238629659.918236 or 1.0217193971332764e-140 < x Initial program 13.3
rmApplied associate-/l*12.8
rmApplied associate-/r/1.2
if -57238629659.918236 < x < 1.0217193971332764e-140Initial program 15.6
rmApplied associate-/l*0.1
Final simplification0.8
herbie shell --seed 2019168
(FPCore (x y)
:name "Linear.Projection:perspective from linear-1.19.1.3, B"
:herbie-target
(if (< x -1.7210442634149447e+81) (* (/ (* 2.0 x) (- x y)) y) (if (< x 8.364504563556443e+16) (/ (* x 2.0) (/ (- x y) y)) (* (/ (* 2.0 x) (- x y)) y)))
(/ (* (* x 2.0) y) (- x y)))