\log \left(N + 1\right) - \log N
\begin{array}{l}
\mathbf{if}\;N \le 7250.408229147694:\\
\;\;\;\;\log \left(\frac{\frac{1 + N}{\sqrt{N}}}{\sqrt{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 r1619102 = N;
double r1619103 = 1.0;
double r1619104 = r1619102 + r1619103;
double r1619105 = log(r1619104);
double r1619106 = log(r1619102);
double r1619107 = r1619105 - r1619106;
return r1619107;
}
double f(double N) {
double r1619108 = N;
double r1619109 = 7250.408229147694;
bool r1619110 = r1619108 <= r1619109;
double r1619111 = 1.0;
double r1619112 = r1619111 + r1619108;
double r1619113 = sqrt(r1619108);
double r1619114 = r1619112 / r1619113;
double r1619115 = r1619114 / r1619113;
double r1619116 = log(r1619115);
double r1619117 = r1619111 / r1619108;
double r1619118 = r1619117 / r1619108;
double r1619119 = -0.5;
double r1619120 = r1619117 * r1619117;
double r1619121 = r1619117 * r1619120;
double r1619122 = 0.3333333333333333;
double r1619123 = fma(r1619121, r1619122, r1619117);
double r1619124 = fma(r1619118, r1619119, r1619123);
double r1619125 = r1619110 ? r1619116 : r1619124;
return r1619125;
}



Bits error versus N
if N < 7250.408229147694Initial program 0.1
Simplified0.1
rmApplied log1p-udef0.1
Applied diff-log0.1
rmApplied add-sqr-sqrt0.1
Applied associate-/r*0.1
if 7250.408229147694 < N Initial program 59.7
Simplified59.7
rmApplied log1p-udef59.7
Applied diff-log59.5
Taylor expanded around inf 0.0
Simplified0.0
Final simplification0.1
herbie shell --seed 2019144 +o rules:numerics
(FPCore (N)
:name "2log (problem 3.3.6)"
(- (log (+ N 1)) (log N)))