\frac{x}{x \cdot x + 1}\begin{array}{l}
\mathbf{if}\;x \le -4377789621347.087890625 \lor \neg \left(x \le 434.3260566585274204953748267143964767456\right):\\
\;\;\;\;\left(\frac{1}{x} + \frac{1}{{x}^{5}}\right) - \frac{1}{{x}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{{x}^{4} - 1 \cdot 1} \cdot \left(x \cdot x - 1\right)\\
\end{array}double f(double x) {
double r45970 = x;
double r45971 = r45970 * r45970;
double r45972 = 1.0;
double r45973 = r45971 + r45972;
double r45974 = r45970 / r45973;
return r45974;
}
double f(double x) {
double r45975 = x;
double r45976 = -4377789621347.088;
bool r45977 = r45975 <= r45976;
double r45978 = 434.3260566585274;
bool r45979 = r45975 <= r45978;
double r45980 = !r45979;
bool r45981 = r45977 || r45980;
double r45982 = 1.0;
double r45983 = r45982 / r45975;
double r45984 = 1.0;
double r45985 = 5.0;
double r45986 = pow(r45975, r45985);
double r45987 = r45984 / r45986;
double r45988 = r45983 + r45987;
double r45989 = 3.0;
double r45990 = pow(r45975, r45989);
double r45991 = r45984 / r45990;
double r45992 = r45988 - r45991;
double r45993 = 4.0;
double r45994 = pow(r45975, r45993);
double r45995 = r45984 * r45984;
double r45996 = r45994 - r45995;
double r45997 = r45975 / r45996;
double r45998 = r45975 * r45975;
double r45999 = r45998 - r45984;
double r46000 = r45997 * r45999;
double r46001 = r45981 ? r45992 : r46000;
return r46001;
}




Bits error versus x
Results
| Original | 14.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.0 |
if x < -4377789621347.088 or 434.3260566585274 < x Initial program 30.7
rmApplied flip-+48.9
Applied associate-/r/48.9
Simplified48.9
Taylor expanded around inf 0.0
Simplified0.0
if -4377789621347.088 < x < 434.3260566585274Initial program 0.0
rmApplied flip-+0.0
Applied associate-/r/0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019326
(FPCore (x)
:name "x / (x^2 + 1)"
:precision binary64
:herbie-target
(/ 1 (+ x (/ 1 x)))
(/ x (+ (* x x) 1)))