\log \left(N + 1\right) - \log N
\begin{array}{l}
\mathbf{if}\;N \le 4842.291926013775:\\
\;\;\;\;\log \left(\frac{\sqrt{1 + N}}{N}\right) + \log \left(\sqrt{1 + N}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{3}, \frac{\frac{\frac{1}{N}}{N}}{N}, \mathsf{fma}\left(\frac{-1}{2}, \frac{\frac{1}{N}}{N}, \frac{1}{N}\right)\right)\\
\end{array}double f(double N) {
double r2036976 = N;
double r2036977 = 1.0;
double r2036978 = r2036976 + r2036977;
double r2036979 = log(r2036978);
double r2036980 = log(r2036976);
double r2036981 = r2036979 - r2036980;
return r2036981;
}
double f(double N) {
double r2036982 = N;
double r2036983 = 4842.291926013775;
bool r2036984 = r2036982 <= r2036983;
double r2036985 = 1.0;
double r2036986 = r2036985 + r2036982;
double r2036987 = sqrt(r2036986);
double r2036988 = r2036987 / r2036982;
double r2036989 = log(r2036988);
double r2036990 = log(r2036987);
double r2036991 = r2036989 + r2036990;
double r2036992 = 0.3333333333333333;
double r2036993 = r2036985 / r2036982;
double r2036994 = r2036993 / r2036982;
double r2036995 = r2036994 / r2036982;
double r2036996 = -0.5;
double r2036997 = fma(r2036996, r2036994, r2036993);
double r2036998 = fma(r2036992, r2036995, r2036997);
double r2036999 = r2036984 ? r2036991 : r2036998;
return r2036999;
}



Bits error versus N
if N < 4842.291926013775Initial program 0.1
Simplified0.1
rmApplied log1p-udef0.1
Applied diff-log0.1
rmApplied *-un-lft-identity0.1
Applied add-sqr-sqrt0.1
Applied times-frac0.1
Applied log-prod0.1
Simplified0.1
if 4842.291926013775 < N Initial program 59.4
Simplified59.4
Taylor expanded around inf 0.0
Simplified0.0
Final simplification0.1
herbie shell --seed 2019163 +o rules:numerics
(FPCore (N)
:name "2log (problem 3.3.6)"
(- (log (+ N 1)) (log N)))