\frac{x}{x \cdot x + 1}\begin{array}{l}
\mathbf{if}\;x \le -4377789621347.087890625 \lor \neg \left(x \le 434.3260566585274204953748267143964767456\right):\\
\;\;\;\;\frac{1}{{x}^{5}} + \left(\frac{1}{x} - \frac{1}{{x}^{3}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{{x}^{4} - 1 \cdot 1} \cdot \left(x \cdot x - 1\right)\\
\end{array}double f(double x) {
double r81912 = x;
double r81913 = r81912 * r81912;
double r81914 = 1.0;
double r81915 = r81913 + r81914;
double r81916 = r81912 / r81915;
return r81916;
}
double f(double x) {
double r81917 = x;
double r81918 = -4377789621347.088;
bool r81919 = r81917 <= r81918;
double r81920 = 434.3260566585274;
bool r81921 = r81917 <= r81920;
double r81922 = !r81921;
bool r81923 = r81919 || r81922;
double r81924 = 1.0;
double r81925 = 5.0;
double r81926 = pow(r81917, r81925);
double r81927 = r81924 / r81926;
double r81928 = 1.0;
double r81929 = r81928 / r81917;
double r81930 = 3.0;
double r81931 = pow(r81917, r81930);
double r81932 = r81924 / r81931;
double r81933 = r81929 - r81932;
double r81934 = r81927 + r81933;
double r81935 = 4.0;
double r81936 = pow(r81917, r81935);
double r81937 = r81924 * r81924;
double r81938 = r81936 - r81937;
double r81939 = r81917 / r81938;
double r81940 = r81917 * r81917;
double r81941 = r81940 - r81924;
double r81942 = r81939 * r81941;
double r81943 = r81923 ? r81934 : r81942;
return r81943;
}




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 add-sqr-sqrt30.7
Applied associate-/r*30.5
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)))