\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 r60390 = x;
double r60391 = r60390 * r60390;
double r60392 = 1.0;
double r60393 = r60391 + r60392;
double r60394 = r60390 / r60393;
return r60394;
}
double f(double x) {
double r60395 = x;
double r60396 = -4377789621347.088;
bool r60397 = r60395 <= r60396;
double r60398 = 434.3260566585274;
bool r60399 = r60395 <= r60398;
double r60400 = !r60399;
bool r60401 = r60397 || r60400;
double r60402 = 1.0;
double r60403 = r60402 / r60395;
double r60404 = 1.0;
double r60405 = 5.0;
double r60406 = pow(r60395, r60405);
double r60407 = r60404 / r60406;
double r60408 = r60403 + r60407;
double r60409 = 3.0;
double r60410 = pow(r60395, r60409);
double r60411 = r60404 / r60410;
double r60412 = r60408 - r60411;
double r60413 = 4.0;
double r60414 = pow(r60395, r60413);
double r60415 = r60404 * r60404;
double r60416 = r60414 - r60415;
double r60417 = r60395 / r60416;
double r60418 = r60395 * r60395;
double r60419 = r60418 - r60404;
double r60420 = r60417 * r60419;
double r60421 = r60401 ? r60412 : r60420;
return r60421;
}




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 *-un-lft-identity30.7
Applied times-frac30.5
Simplified30.5
Simplified30.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 +o rules:numerics
(FPCore (x)
:name "x / (x^2 + 1)"
:precision binary64
:herbie-target
(/ 1 (+ x (/ 1 x)))
(/ x (+ (* x x) 1)))