\log \left(N + 1\right) - \log N
\begin{array}{l}
\mathbf{if}\;N \le 9504.960256628374:\\
\;\;\;\;-\log \left(\frac{N}{1 + N}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{N \cdot N}, \frac{-1}{2}, \mathsf{fma}\left(\frac{1}{3}, \frac{\frac{1}{N \cdot N}}{N}, \frac{1}{N}\right)\right)\\
\end{array}double f(double N) {
double r1004236 = N;
double r1004237 = 1.0;
double r1004238 = r1004236 + r1004237;
double r1004239 = log(r1004238);
double r1004240 = log(r1004236);
double r1004241 = r1004239 - r1004240;
return r1004241;
}
double f(double N) {
double r1004242 = N;
double r1004243 = 9504.960256628374;
bool r1004244 = r1004242 <= r1004243;
double r1004245 = 1.0;
double r1004246 = r1004245 + r1004242;
double r1004247 = r1004242 / r1004246;
double r1004248 = log(r1004247);
double r1004249 = -r1004248;
double r1004250 = r1004242 * r1004242;
double r1004251 = r1004245 / r1004250;
double r1004252 = -0.5;
double r1004253 = 0.3333333333333333;
double r1004254 = r1004251 / r1004242;
double r1004255 = r1004245 / r1004242;
double r1004256 = fma(r1004253, r1004254, r1004255);
double r1004257 = fma(r1004251, r1004252, r1004256);
double r1004258 = r1004244 ? r1004249 : r1004257;
return r1004258;
}



Bits error versus N
if N < 9504.960256628374Initial program 0.1
Simplified0.1
rmApplied log1p-udef0.1
Applied diff-log0.1
rmApplied *-un-lft-identity0.1
Applied associate-/l*0.1
rmApplied add-exp-log0.1
Applied rec-exp0.1
Applied rem-log-exp0.1
if 9504.960256628374 < N Initial program 59.6
Simplified59.6
rmApplied log1p-udef59.6
Applied diff-log59.4
rmApplied *-un-lft-identity59.4
Applied associate-/l*59.4
Taylor expanded around -inf 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019142 +o rules:numerics
(FPCore (N)
:name "2log (problem 3.3.6)"
(- (log (+ N 1)) (log N)))