\log \left(N + 1\right) - \log N
\begin{array}{l}
\mathbf{if}\;N \le 9550.567671573803:\\
\;\;\;\;\log \left(\frac{1 + N}{N}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(\frac{\frac{1}{N}}{N}\right), \frac{-1}{2}, \left(\mathsf{fma}\left(\left(\frac{\frac{\frac{1}{N}}{N}}{N}\right), \frac{1}{3}, \left(\frac{1}{N}\right)\right)\right)\right)\\
\end{array}double f(double N) {
double r553808 = N;
double r553809 = 1.0;
double r553810 = r553808 + r553809;
double r553811 = log(r553810);
double r553812 = log(r553808);
double r553813 = r553811 - r553812;
return r553813;
}
double f(double N) {
double r553814 = N;
double r553815 = 9550.567671573803;
bool r553816 = r553814 <= r553815;
double r553817 = 1.0;
double r553818 = r553817 + r553814;
double r553819 = r553818 / r553814;
double r553820 = log(r553819);
double r553821 = r553817 / r553814;
double r553822 = r553821 / r553814;
double r553823 = -0.5;
double r553824 = r553822 / r553814;
double r553825 = 0.3333333333333333;
double r553826 = fma(r553824, r553825, r553821);
double r553827 = fma(r553822, r553823, r553826);
double r553828 = r553816 ? r553820 : r553827;
return r553828;
}



Bits error versus N
if N < 9550.567671573803Initial program 0.1
Simplified0.1
rmApplied log1p-udef0.1
Applied diff-log0.1
if 9550.567671573803 < N Initial program 59.6
Simplified59.6
rmApplied log1p-udef59.6
Applied diff-log59.3
rmApplied add-sqr-sqrt59.3
Taylor expanded around -inf 0.0
Simplified0.0
Final simplification0.1
herbie shell --seed 2019128 +o rules:numerics
(FPCore (N)
:name "2log (problem 3.3.6)"
(- (log (+ N 1)) (log N)))