1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -132294310.463103905 \lor \neg \left(y \le 94033634.6152255684\right):\\
\;\;\;\;1 \cdot \left(\frac{1}{y} - \frac{x}{y}\right) + x\\
\mathbf{else}:\\
\;\;\;\;\left(1 - y \cdot \left(\left(1 - x\right) \cdot \frac{y}{y \cdot y - 1 \cdot 1}\right)\right) - \left(-1\right) \cdot \left(\left(1 - x\right) \cdot \frac{y}{y \cdot y - 1 \cdot 1}\right)\\
\end{array}double f(double x, double y) {
double r716860 = 1.0;
double r716861 = x;
double r716862 = r716860 - r716861;
double r716863 = y;
double r716864 = r716862 * r716863;
double r716865 = r716863 + r716860;
double r716866 = r716864 / r716865;
double r716867 = r716860 - r716866;
return r716867;
}
double f(double x, double y) {
double r716868 = y;
double r716869 = -132294310.4631039;
bool r716870 = r716868 <= r716869;
double r716871 = 94033634.61522557;
bool r716872 = r716868 <= r716871;
double r716873 = !r716872;
bool r716874 = r716870 || r716873;
double r716875 = 1.0;
double r716876 = 1.0;
double r716877 = r716876 / r716868;
double r716878 = x;
double r716879 = r716878 / r716868;
double r716880 = r716877 - r716879;
double r716881 = r716875 * r716880;
double r716882 = r716881 + r716878;
double r716883 = r716875 - r716878;
double r716884 = r716868 * r716868;
double r716885 = r716875 * r716875;
double r716886 = r716884 - r716885;
double r716887 = r716868 / r716886;
double r716888 = r716883 * r716887;
double r716889 = r716868 * r716888;
double r716890 = r716875 - r716889;
double r716891 = -r716875;
double r716892 = r716891 * r716888;
double r716893 = r716890 - r716892;
double r716894 = r716874 ? r716882 : r716893;
return r716894;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.5 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -132294310.4631039 or 94033634.61522557 < y Initial program 45.7
Taylor expanded around inf 0.2
Simplified0.2
if -132294310.4631039 < y < 94033634.61522557Initial program 0.2
rmApplied *-un-lft-identity0.2
Applied times-frac0.2
Simplified0.2
rmApplied flip-+0.2
Applied associate-/r/0.2
Applied associate-*r*0.2
rmApplied sub-neg0.2
Applied distribute-rgt-in0.2
Applied associate--r+0.2
Final simplification0.2
herbie shell --seed 2020003
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, D"
:precision binary64
:herbie-target
(if (< y -3693.8482788297247) (- (/ 1 y) (- (/ x y) x)) (if (< y 6799310503.41891) (- 1 (/ (* (- 1 x) y) (+ y 1))) (- (/ 1 y) (- (/ x y) x))))
(- 1 (/ (* (- 1 x) y) (+ y 1))))