Average Error: 14.8 → 0.4
Time: 21.1s
Precision: 64
Internal Precision: 832
\[\frac{1}{X} - \frac{1}{X + 1}\]
\[\frac{1}{X + X \cdot X}\]

Error

Bits error versus X

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 14.8

    \[\frac{1}{X} - \frac{1}{X + 1}\]
  2. Using strategy rm
  3. Applied frac-sub14.1

    \[\leadsto \color{blue}{\frac{1 \cdot \left(X + 1\right) - X \cdot 1}{X \cdot \left(X + 1\right)}}\]
  4. Applied simplify0.4

    \[\leadsto \frac{\color{blue}{1}}{X \cdot \left(X + 1\right)}\]
  5. Using strategy rm
  6. Applied clear-num0.4

    \[\leadsto \color{blue}{\frac{1}{\frac{X \cdot \left(X + 1\right)}{1}}}\]
  7. Applied simplify0.4

    \[\leadsto \frac{1}{\color{blue}{X + X \cdot X}}\]

Runtime

Time bar (total: 21.1s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (X)
  :name "1/X - 1/(X+1)"
  (- (/ 1 X) (/ 1 (+ X 1))))