\log \left(N + 1\right) - \log N
\begin{array}{l}
\mathbf{if}\;N \le 8813.444147086946:\\
\;\;\;\;\log \left(1 + \frac{1}{N}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{1}{3}}{N} - \frac{1}{2}}{N \cdot N} + \frac{1}{N}\\
\end{array}double f(double N) {
double r1063719 = N;
double r1063720 = 1.0;
double r1063721 = r1063719 + r1063720;
double r1063722 = log(r1063721);
double r1063723 = log(r1063719);
double r1063724 = r1063722 - r1063723;
return r1063724;
}
double f(double N) {
double r1063725 = N;
double r1063726 = 8813.444147086946;
bool r1063727 = r1063725 <= r1063726;
double r1063728 = 1.0;
double r1063729 = r1063728 / r1063725;
double r1063730 = r1063728 + r1063729;
double r1063731 = log(r1063730);
double r1063732 = 0.3333333333333333;
double r1063733 = r1063732 / r1063725;
double r1063734 = 0.5;
double r1063735 = r1063733 - r1063734;
double r1063736 = r1063725 * r1063725;
double r1063737 = r1063735 / r1063736;
double r1063738 = r1063737 + r1063729;
double r1063739 = r1063727 ? r1063731 : r1063738;
return r1063739;
}



Bits error versus N
Results
if N < 8813.444147086946Initial program 0.1
rmApplied add-log-exp0.1
Simplified0.1
Taylor expanded around inf 0.1
if 8813.444147086946 < N Initial program 59.5
rmApplied add-log-exp59.5
Simplified59.3
Taylor expanded around inf 59.3
Taylor expanded around inf 0.0
Simplified0.0
Final simplification0.1
herbie shell --seed 2019130
(FPCore (N)
:name "2log (problem 3.3.6)"
(- (log (+ N 1)) (log N)))