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

Error

Bits error versus N

Derivation

  1. Initial program 29.4

    \[\log \left(N + 1\right) - \log N\]
  2. Applied simplify29.4

    \[\leadsto \color{blue}{\log_* (1 + N) - \log N}\]
  3. Using strategy rm
  4. Applied add-log-exp29.4

    \[\leadsto \color{blue}{\log \left(e^{\log_* (1 + N)}\right)} - \log N\]
  5. Applied diff-log29.8

    \[\leadsto \color{blue}{\log \left(\frac{e^{\log_* (1 + N)}}{N}\right)}\]
  6. Taylor expanded around 0 29.2

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

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

Runtime

Time bar (total: 43.4s)Debug logProfile

herbie shell --seed '#(1070578969 3140398606 632207097 462683394 1189254563 964980650)' +o rules:numerics
(FPCore (N)
  :name "2log (problem 3.3.6)"
  (- (log (+ N 1)) (log N)))