Average Error: 30.2 → 0.0
Time: 26.4s
Precision: 64
Internal Precision: 1600
\[\log \left(N + 1\right) - \log N\]
\[\log_* (1 + \frac{1}{N})\]

Error

Bits error versus N

Try it out

  1. Inputs

  2. Original Output:

    Herbie Output:

Derivation

  1. Initial program 30.2

    \[\log \left(N + 1\right) - \log N\]
  2. Using strategy rm
  3. Applied diff-log30.1

    \[\leadsto \color{blue}{\log \left(\frac{N + 1}{N}\right)}\]
  4. Taylor expanded around 0 30.1

    \[\leadsto \log \color{blue}{\left(1 + \frac{1}{N}\right)}\]
  5. Applied simplify0.0

    \[\leadsto \color{blue}{\log_* (1 + \frac{1}{N})}\]

Runtime

Time bar (total: 26.4s)Debug logProfile

herbie shell --seed '#(1072361757 3390613284 2339397988 1175251238 145061547 3101881848)' +o rules:numerics
(FPCore (N)
  :name "2log (problem 3.3.6)"
  (- (log (+ N 1)) (log N)))