Error: 40.2 → 19.5
Time: 11.7s
Precision: 64
Ground Truth: 128
\[\log \left(N + 1\right) - \log N\]
\[\begin{cases} \log \left(\frac{N + 1}{N}\right) & \text{when } N \le 108678362595.63406 \\ \frac{\frac{\frac{1}{3}}{N} - \frac{1}{2}}{{N}^2} + \frac{1}{N} & \text{otherwise} \end{cases}\]

Error

Bits error versus N

Derivation

    if N < 108678362595.63406

    1. Initial program 30.9

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

      \[\leadsto \color{blue}{\log \left(\frac{N + 1}{N}\right)}\]

    if 108678362595.63406 < N

    1. Initial program 60.3

      \[\log \left(N + 1\right) - \log N\]
    2. Applied taylor 0.0

      \[\leadsto \left(\frac{1}{3} \cdot \frac{1}{{N}^{3}} + \frac{1}{N}\right) - \frac{1}{2} \cdot \frac{1}{{N}^2}\]
    3. Taylor expanded around inf 0.0

      \[\leadsto \color{blue}{\left(\frac{1}{3} \cdot \frac{1}{{N}^{3}} + \frac{1}{N}\right) - \frac{1}{2} \cdot \frac{1}{{N}^2}}\]
    4. Applied simplify 0.0

      \[\leadsto \color{blue}{\frac{\frac{1}{N}}{N} \cdot \left(\frac{\frac{1}{3}}{N} - \frac{1}{2}\right) + \frac{1}{N}}\]
    5. Applied simplify 0.0

      \[\leadsto \color{blue}{\frac{\frac{\frac{1}{3}}{N} - \frac{1}{2}}{{N}^2}} + \frac{1}{N}\]
  1. Removed slow pow expressions

Runtime

Total time: 11.7s Debug log

Please report a bug with the following info:

herbie --seed '#(2896408995 2271164334 4227105464 2318239088 3730899072 665169272)'
(FPCore (N)
  :name "NMSE problem 3.3.6"
  (- (log (+ N 1)) (log N)))