Input Error: 14.6b
Output Error: 0.2b
Time: 14.0s
Precision: 64b
Ground Truth: 128b
\[\frac{1}{x + 1} - \frac{1}{x}\]
\[\begin{cases} \frac{1}{{x}^{3}} - \left(\frac{1}{{x}^{4}} + \frac{\frac{1}{x}}{x}\right) & \text{when } x \le -0.11817437388404825 \\ \frac{x - \left(1 + x\right)}{\left(x + 1\right) \cdot x} & \text{when } x \le 4.119393484819504 \cdot 10^{+18} \\ \frac{1}{{x}^{3}} - \left(\frac{1}{{x}^{4}} + \frac{\frac{1}{x}}{x}\right) & \text{otherwise} \end{cases}\]

Error

Bits error versus x

Derivation

    if x < -0.11817437388404825 or 4.119393484819504e+18 < x

    1. Initial program 29.2b

      \[\frac{1}{x + 1} - \frac{1}{x}\]
    2. Applied taylor 0.8b

      \[\leadsto \frac{1}{{x}^{3}} - \left(\frac{1}{{x}^{4}} + \frac{1}{{x}^2}\right)\]
    3. Taylor expanded around inf 0.8b

      \[\leadsto \color{blue}{\frac{1}{{x}^{3}} - \left(\frac{1}{{x}^{4}} + \frac{1}{{x}^2}\right)}\]
    4. Using strategy rm
    5. Applied square-mult 0.8b

      \[\leadsto \frac{1}{{x}^{3}} - \left(\frac{1}{{x}^{4}} + \frac{1}{\color{blue}{x \cdot x}}\right)\]
    6. Applied associate-/r* 0.1b

      \[\leadsto \frac{1}{{x}^{3}} - \left(\frac{1}{{x}^{4}} + \color{blue}{\frac{\frac{1}{x}}{x}}\right)\]

    if -0.11817437388404825 < x < 4.119393484819504e+18

    1. Initial program 0.9b

      \[\frac{1}{x + 1} - \frac{1}{x}\]
    2. Using strategy rm
    3. Applied frac-sub 0.3b

      \[\leadsto \color{blue}{\frac{1 \cdot x - \left(x + 1\right) \cdot 1}{\left(x + 1\right) \cdot x}}\]
    4. Applied simplify 0.3b

      \[\leadsto \frac{\color{blue}{x - \left(1 + x\right)}}{\left(x + 1\right) \cdot x}\]
  1. Removed slow pow expressions

Runtime

Total time: 14.0s Debug log

herbie --seed '#(3791018568 2264411635 4174834059 670132113 3373095762 2989977472)'
(FPCore (x)
  :name "NMSE problem 3.3.1"
  (- (/ 1 (+ x 1)) (/ 1 x)))