\log \left(N + 1\right) - \log N
\begin{array}{l}
\mathbf{if}\;N \le 8386.707428118045:\\
\;\;\;\;\log \left(\frac{1 + N}{N}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\frac{1}{N}}{N}, \frac{-1}{2}, \mathsf{fma}\left(\frac{1}{N} \cdot \left(\frac{1}{N} \cdot \frac{1}{N}\right), \frac{1}{3}, \frac{1}{N}\right)\right)\\
\end{array}double f(double N) {
double r1164848 = N;
double r1164849 = 1.0;
double r1164850 = r1164848 + r1164849;
double r1164851 = log(r1164850);
double r1164852 = log(r1164848);
double r1164853 = r1164851 - r1164852;
return r1164853;
}
double f(double N) {
double r1164854 = N;
double r1164855 = 8386.707428118045;
bool r1164856 = r1164854 <= r1164855;
double r1164857 = 1.0;
double r1164858 = r1164857 + r1164854;
double r1164859 = r1164858 / r1164854;
double r1164860 = log(r1164859);
double r1164861 = r1164857 / r1164854;
double r1164862 = r1164861 / r1164854;
double r1164863 = -0.5;
double r1164864 = r1164861 * r1164861;
double r1164865 = r1164861 * r1164864;
double r1164866 = 0.3333333333333333;
double r1164867 = fma(r1164865, r1164866, r1164861);
double r1164868 = fma(r1164862, r1164863, r1164867);
double r1164869 = r1164856 ? r1164860 : r1164868;
return r1164869;
}



Bits error versus N
if N < 8386.707428118045Initial program 0.1
Simplified0.1
rmApplied log1p-udef0.1
Applied diff-log0.1
if 8386.707428118045 < N Initial program 59.4
Simplified59.4
rmApplied log1p-udef59.4
Applied diff-log59.2
Taylor expanded around inf 0.0
Simplified0.0
Final simplification0.1
herbie shell --seed 2019152 +o rules:numerics
(FPCore (N)
:name "2log (problem 3.3.6)"
(- (log (+ N 1)) (log N)))