Average Error: 62.0 → 56.2
Time: 45.5s
Precision: 64
Internal Precision: 128
\[\frac{1}{x + 1} - \frac{1}{x}\]
\[\sqrt{\left(3 - \frac{2}{x}\right) + e^{-\log \left(x \cdot x\right)}}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 62.0

    \[\frac{1}{x + 1} - \frac{1}{x}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt61.6

    \[\leadsto \color{blue}{\sqrt{\frac{1}{x + 1} - \frac{1}{x}} \cdot \sqrt{\frac{1}{x + 1} - \frac{1}{x}}}\]
  4. Using strategy rm
  5. Applied sqrt-unprod61.2

    \[\leadsto \color{blue}{\sqrt{\left(\frac{1}{x + 1} - \frac{1}{x}\right) \cdot \left(\frac{1}{x + 1} - \frac{1}{x}\right)}}\]
  6. Taylor expanded around 0 56.2

    \[\leadsto \sqrt{\color{blue}{\left(\frac{1}{{x}^{2}} + 3\right) - 2 \cdot \frac{1}{x}}}\]
  7. Simplified56.2

    \[\leadsto \sqrt{\color{blue}{\frac{1}{x \cdot x} + \left(3 - \frac{2}{x}\right)}}\]
  8. Using strategy rm
  9. Applied add-exp-log56.2

    \[\leadsto \sqrt{\frac{1}{\color{blue}{e^{\log \left(x \cdot x\right)}}} + \left(3 - \frac{2}{x}\right)}\]
  10. Applied rec-exp56.2

    \[\leadsto \sqrt{\color{blue}{e^{-\log \left(x \cdot x\right)}} + \left(3 - \frac{2}{x}\right)}\]
  11. Final simplification56.2

    \[\leadsto \sqrt{\left(3 - \frac{2}{x}\right) + e^{-\log \left(x \cdot x\right)}}\]

Runtime

Time bar (total: 45.5s)Debug logProfile

herbie shell --seed 2018255 
(FPCore (x)
  :name "2frac (problem 3.3.1)"
  (- (/ 1 (+ x 1)) (/ 1 x)))