Average Error: 0.0 → 0.0
Time: 21.2s
Precision: 64
Internal Precision: 128
\[1 - \frac{1}{2 + \left(2 - \frac{\frac{2}{t}}{1 + \frac{1}{t}}\right) \cdot \left(2 - \frac{\frac{2}{t}}{1 + \frac{1}{t}}\right)}\]
\[1 - \frac{1}{2 + \log \left(\frac{e^{2}}{e^{\frac{2}{1 + t}}}\right) \cdot \left(2 - \frac{2}{1 + t}\right)}\]

Error

Bits error versus t

Derivation

  1. Initial program 0.0

    \[1 - \frac{1}{2 + \left(2 - \frac{\frac{2}{t}}{1 + \frac{1}{t}}\right) \cdot \left(2 - \frac{\frac{2}{t}}{1 + \frac{1}{t}}\right)}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{1 - \frac{1}{2 + \left(2 - \frac{2}{1 + t}\right) \cdot \left(2 - \frac{2}{1 + t}\right)}}\]
  3. Using strategy rm
  4. Applied add-log-exp0.0

    \[\leadsto 1 - \frac{1}{2 + \left(2 - \frac{2}{1 + t}\right) \cdot \left(2 - \color{blue}{\log \left(e^{\frac{2}{1 + t}}\right)}\right)}\]
  5. Applied add-log-exp0.0

    \[\leadsto 1 - \frac{1}{2 + \left(2 - \frac{2}{1 + t}\right) \cdot \left(\color{blue}{\log \left(e^{2}\right)} - \log \left(e^{\frac{2}{1 + t}}\right)\right)}\]
  6. Applied diff-log0.0

    \[\leadsto 1 - \frac{1}{2 + \left(2 - \frac{2}{1 + t}\right) \cdot \color{blue}{\log \left(\frac{e^{2}}{e^{\frac{2}{1 + t}}}\right)}}\]
  7. Final simplification0.0

    \[\leadsto 1 - \frac{1}{2 + \log \left(\frac{e^{2}}{e^{\frac{2}{1 + t}}}\right) \cdot \left(2 - \frac{2}{1 + t}\right)}\]

Reproduce

herbie shell --seed 2019088 
(FPCore (t)
  :name "Kahan p13 Example 3"
  (- 1 (/ 1 (+ 2 (* (- 2 (/ (/ 2 t) (+ 1 (/ 1 t)))) (- 2 (/ (/ 2 t) (+ 1 (/ 1 t)))))))))