\log \left(N + 1\right) - \log N
\begin{array}{l}
\mathbf{if}\;N \le 4197.0257073922457:\\
\;\;\;\;\sqrt[3]{{\left(\log \left(N + 1\right)\right)}^{3}} - \log N\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.333333333333333315, \frac{1}{{N}^{3}}, 1 \cdot \frac{1}{N} - 0.5 \cdot \frac{1}{{N}^{2}}\right)\\
\end{array}double code(double N) {
return (log((N + 1.0)) - log(N));
}
double code(double N) {
double temp;
if ((N <= 4197.025707392246)) {
temp = (cbrt(pow(log((N + 1.0)), 3.0)) - log(N));
} else {
temp = fma(0.3333333333333333, (1.0 / pow(N, 3.0)), ((1.0 * (1.0 / N)) - (0.5 * (1.0 / pow(N, 2.0)))));
}
return temp;
}



Bits error versus N
Results
if N < 4197.025707392246Initial program 0.1
rmApplied add-cbrt-cube0.1
Simplified0.1
if 4197.025707392246 < N Initial program 59.5
rmApplied add-cbrt-cube59.8
Simplified59.7
Taylor expanded around inf 0.0
Simplified0.0
Final simplification0.1
herbie shell --seed 2020049 +o rules:numerics
(FPCore (N)
:name "2log (problem 3.3.6)"
:precision binary64
(- (log (+ N 1)) (log N)))