\frac{x}{x \cdot x + 1}\begin{array}{l}
\mathbf{if}\;x \le -7.923926095867654392077641242627372883506 \cdot 10^{69} \lor \neg \left(x \le 409.7573101064140246307943016290664672852\right):\\
\;\;\;\;\left(\frac{1}{x} + \frac{1}{{x}^{5}}\right) - \frac{1}{{x}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x \cdot {x}^{3} - 1 \cdot 1} \cdot \left(x \cdot x - 1\right)\\
\end{array}double f(double x) {
double r45759 = x;
double r45760 = r45759 * r45759;
double r45761 = 1.0;
double r45762 = r45760 + r45761;
double r45763 = r45759 / r45762;
return r45763;
}
double f(double x) {
double r45764 = x;
double r45765 = -7.923926095867654e+69;
bool r45766 = r45764 <= r45765;
double r45767 = 409.757310106414;
bool r45768 = r45764 <= r45767;
double r45769 = !r45768;
bool r45770 = r45766 || r45769;
double r45771 = 1.0;
double r45772 = r45771 / r45764;
double r45773 = 1.0;
double r45774 = 5.0;
double r45775 = pow(r45764, r45774);
double r45776 = r45773 / r45775;
double r45777 = r45772 + r45776;
double r45778 = 3.0;
double r45779 = pow(r45764, r45778);
double r45780 = r45773 / r45779;
double r45781 = r45777 - r45780;
double r45782 = r45764 * r45779;
double r45783 = r45773 * r45773;
double r45784 = r45782 - r45783;
double r45785 = r45764 / r45784;
double r45786 = r45764 * r45764;
double r45787 = r45786 - r45773;
double r45788 = r45785 * r45787;
double r45789 = r45770 ? r45781 : r45788;
return r45789;
}




Bits error versus x
Results
| Original | 15.2 |
|---|---|
| Target | 0.1 |
| Herbie | 0.0 |
if x < -7.923926095867654e+69 or 409.757310106414 < x Initial program 34.3
rmApplied flip-+54.2
Applied associate-/r/54.3
Simplified54.3
Taylor expanded around inf 0.0
Simplified0.0
if -7.923926095867654e+69 < x < 409.757310106414Initial program 0.0
rmApplied flip-+0.0
Applied associate-/r/0.1
Simplified0.1
Final simplification0.0
herbie shell --seed 2019209
(FPCore (x)
:name "x / (x^2 + 1)"
:precision binary64
:herbie-target
(/ 1 (+ x (/ 1 x)))
(/ x (+ (* x x) 1)))