Average Error: 28.8 → 0.2
Time: 42.6s
Precision: 64
Internal Precision: 1408
\[\log \left(N + 1\right) - \log N\]
\[\begin{array}{l} \mathbf{if}\;\log \left(N + 1\right) - \log N \le 1.5458009983149168 \cdot 10^{-08}:\\ \;\;\;\;\frac{1}{N} - (\left(\frac{1}{N}\right) \cdot \left(\frac{\frac{1}{2}}{N}\right) + \left(\log 1\right))_*\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt[3]{\log_* (1 + N)} \cdot \sqrt[3]{\log_* (1 + N)}\right) \cdot \sqrt[3]{\log_* (1 + N)} - \log N\\ \end{array}\]

Error

Bits error versus N

Derivation

  1. Split input into 2 regimes
  2. if (- (log (+ N 1)) (log N)) < 1.5458009983149168e-08

    1. Initial program 60.1

      \[\log \left(N + 1\right) - \log N\]
    2. Taylor expanded around inf 60.1

      \[\leadsto \color{blue}{\left(\frac{1}{N} - \left(\log \left(\frac{1}{N}\right) + \frac{1}{2} \cdot \frac{1}{{N}^{2}}\right)\right)} - \log N\]
    3. Applied simplify0.0

      \[\leadsto \color{blue}{\frac{1}{N} - (\left(\frac{1}{N}\right) \cdot \left(\frac{\frac{1}{2}}{N}\right) + \left(\log 1\right))_*}\]

    if 1.5458009983149168e-08 < (- (log (+ N 1)) (log N))

    1. Initial program 0.3

      \[\log \left(N + 1\right) - \log N\]
    2. Using strategy rm
    3. Applied add-cube-cbrt0.4

      \[\leadsto \color{blue}{\left(\sqrt[3]{\log \left(N + 1\right)} \cdot \sqrt[3]{\log \left(N + 1\right)}\right) \cdot \sqrt[3]{\log \left(N + 1\right)}} - \log N\]
    4. Applied simplify0.4

      \[\leadsto \color{blue}{\left(\sqrt[3]{\log_* (1 + N)} \cdot \sqrt[3]{\log_* (1 + N)}\right)} \cdot \sqrt[3]{\log \left(N + 1\right)} - \log N\]
    5. Applied simplify0.4

      \[\leadsto \left(\sqrt[3]{\log_* (1 + N)} \cdot \sqrt[3]{\log_* (1 + N)}\right) \cdot \color{blue}{\sqrt[3]{\log_* (1 + N)}} - \log N\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 42.6s)Debug logProfile

herbie shell --seed '#(1070258749 1877548225 2229079127 1588002776 3179087814 1886870650)' +o rules:numerics
(FPCore (N)
  :name "2log (problem 3.3.6)"
  (- (log (+ N 1)) (log N)))