\frac{x + y}{\left(x \cdot 2\right) \cdot y}\begin{array}{l}
\mathbf{if}\;y \le -28977.22179038679678342305123805999755859:\\
\;\;\;\;\frac{y + x}{y} \cdot \frac{1}{x \cdot 2}\\
\mathbf{elif}\;y \le 3.496989925683049938768280575041583491689 \cdot 10^{-34}:\\
\;\;\;\;\frac{\frac{y + x}{x \cdot 2}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y + x}{y} \cdot \frac{1}{x \cdot 2}\\
\end{array}double f(double x, double y) {
double r24623769 = x;
double r24623770 = y;
double r24623771 = r24623769 + r24623770;
double r24623772 = 2.0;
double r24623773 = r24623769 * r24623772;
double r24623774 = r24623773 * r24623770;
double r24623775 = r24623771 / r24623774;
return r24623775;
}
double f(double x, double y) {
double r24623776 = y;
double r24623777 = -28977.221790386797;
bool r24623778 = r24623776 <= r24623777;
double r24623779 = x;
double r24623780 = r24623776 + r24623779;
double r24623781 = r24623780 / r24623776;
double r24623782 = 1.0;
double r24623783 = 2.0;
double r24623784 = r24623779 * r24623783;
double r24623785 = r24623782 / r24623784;
double r24623786 = r24623781 * r24623785;
double r24623787 = 3.49698992568305e-34;
bool r24623788 = r24623776 <= r24623787;
double r24623789 = r24623780 / r24623784;
double r24623790 = r24623789 / r24623776;
double r24623791 = r24623788 ? r24623790 : r24623786;
double r24623792 = r24623778 ? r24623786 : r24623791;
return r24623792;
}




Bits error versus x




Bits error versus y
Results
| Original | 14.9 |
|---|---|
| Target | 0.0 |
| Herbie | 0.1 |
if y < -28977.221790386797 or 3.49698992568305e-34 < y Initial program 14.3
rmApplied *-un-lft-identity14.3
Applied times-frac0.2
if -28977.221790386797 < y < 3.49698992568305e-34Initial program 15.6
rmApplied associate-/r*0.1
Final simplification0.1
herbie shell --seed 2019168
(FPCore (x y)
:name "Linear.Projection:inversePerspective from linear-1.19.1.3, C"
:herbie-target
(+ (/ 0.5 x) (/ 0.5 y))
(/ (+ x y) (* (* x 2.0) y)))