\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -15309.12152708683424862101674079895019531 \lor \neg \left(x \le 12455.49900284703107899986207485198974609\right):\\
\;\;\;\;\frac{-1}{x \cdot x} - \left(\frac{3}{{x}^{3}} + \frac{3}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + 1} - \frac{x + 1}{x - 1}}{\mathsf{fma}\left(\frac{x}{x + 1}, \frac{x}{x + 1}, \frac{x + 1}{x - 1} \cdot \left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right)\right)} \cdot \mathsf{fma}\left(\frac{x + 1}{x - 1}, \frac{x}{x + 1} + \frac{x + 1}{x - 1}, {\left(\sqrt[3]{\frac{x}{x + 1}}\right)}^{6}\right)\\
\end{array}double f(double x) {
double r129121 = x;
double r129122 = 1.0;
double r129123 = r129121 + r129122;
double r129124 = r129121 / r129123;
double r129125 = r129121 - r129122;
double r129126 = r129123 / r129125;
double r129127 = r129124 - r129126;
return r129127;
}
double f(double x) {
double r129128 = x;
double r129129 = -15309.121527086834;
bool r129130 = r129128 <= r129129;
double r129131 = 12455.499002847031;
bool r129132 = r129128 <= r129131;
double r129133 = !r129132;
bool r129134 = r129130 || r129133;
double r129135 = 1.0;
double r129136 = -r129135;
double r129137 = r129128 * r129128;
double r129138 = r129136 / r129137;
double r129139 = 3.0;
double r129140 = 3.0;
double r129141 = pow(r129128, r129140);
double r129142 = r129139 / r129141;
double r129143 = r129139 / r129128;
double r129144 = r129142 + r129143;
double r129145 = r129138 - r129144;
double r129146 = r129128 + r129135;
double r129147 = r129128 / r129146;
double r129148 = r129128 - r129135;
double r129149 = r129146 / r129148;
double r129150 = r129147 - r129149;
double r129151 = r129147 + r129149;
double r129152 = r129149 * r129151;
double r129153 = fma(r129147, r129147, r129152);
double r129154 = r129150 / r129153;
double r129155 = cbrt(r129147);
double r129156 = 6.0;
double r129157 = pow(r129155, r129156);
double r129158 = fma(r129149, r129151, r129157);
double r129159 = r129154 * r129158;
double r129160 = r129134 ? r129145 : r129159;
return r129160;
}



Bits error versus x
if x < -15309.121527086834 or 12455.499002847031 < x Initial program 59.4
rmApplied add-log-exp59.4
Applied add-log-exp59.4
Applied diff-log59.4
Simplified59.4
Taylor expanded around inf 0.3
Simplified0.0
if -15309.121527086834 < x < 12455.499002847031Initial program 0.1
rmApplied add-log-exp0.1
Applied add-log-exp0.1
Applied diff-log0.1
Simplified0.1
rmApplied flip3--0.1
Simplified0.1
rmApplied *-un-lft-identity0.1
Applied difference-cubes0.1
Applied times-frac0.1
Applied exp-prod0.1
Applied log-pow0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019323 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))