\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -7534224028620261 \lor \neg \left(x \le 7051386931030.59765625\right):\\
\;\;\;\;\frac{-1}{x \cdot x} - \left(\frac{3}{{x}^{3}} + \frac{3}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x \cdot x - 1 \cdot 1} \cdot \left(\left(x - 1\right) - \left(x + 1\right)\right) - \frac{1}{x - 1} \cdot 1\\
\end{array}double f(double x) {
double r74691 = x;
double r74692 = 1.0;
double r74693 = r74691 + r74692;
double r74694 = r74691 / r74693;
double r74695 = r74691 - r74692;
double r74696 = r74693 / r74695;
double r74697 = r74694 - r74696;
return r74697;
}
double f(double x) {
double r74698 = x;
double r74699 = -7534224028620261.0;
bool r74700 = r74698 <= r74699;
double r74701 = 7051386931030.598;
bool r74702 = r74698 <= r74701;
double r74703 = !r74702;
bool r74704 = r74700 || r74703;
double r74705 = 1.0;
double r74706 = -r74705;
double r74707 = r74698 * r74698;
double r74708 = r74706 / r74707;
double r74709 = 3.0;
double r74710 = 3.0;
double r74711 = pow(r74698, r74710);
double r74712 = r74709 / r74711;
double r74713 = r74709 / r74698;
double r74714 = r74712 + r74713;
double r74715 = r74708 - r74714;
double r74716 = r74705 * r74705;
double r74717 = r74707 - r74716;
double r74718 = r74698 / r74717;
double r74719 = r74698 - r74705;
double r74720 = r74698 + r74705;
double r74721 = r74719 - r74720;
double r74722 = r74718 * r74721;
double r74723 = 1.0;
double r74724 = r74723 / r74719;
double r74725 = r74724 * r74705;
double r74726 = r74722 - r74725;
double r74727 = r74704 ? r74715 : r74726;
return r74727;
}



Bits error versus x
Results
if x < -7534224028620261.0 or 7051386931030.598 < x Initial program 60.4
rmApplied flip--61.6
Applied associate-/r/61.5
Simplified60.5
Taylor expanded around inf 0.3
Simplified0.0
if -7534224028620261.0 < x < 7051386931030.598Initial program 1.0
rmApplied flip--1.0
Applied associate-/r/1.0
Simplified1.0
rmApplied distribute-lft-in1.0
Applied associate--r+1.0
Simplified1.0
rmApplied flip--1.0
Applied associate-/r/1.0
Applied flip-+1.0
Applied associate-/r/1.0
Applied distribute-lft-out--0.0
Final simplification0.0
herbie shell --seed 2019303
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))