Average Error: 0.0 → 0.0
Time: 14.4s
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}{\left(\sqrt[3]{2 - \frac{2}{1 + t}} \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right) \cdot \left(\left(2 - \frac{2}{1 + t}\right) \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right) + 2}\]

Error

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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-cube-cbrt0.0

    \[\leadsto 1 - \frac{1}{2 + \color{blue}{\left(\left(\sqrt[3]{2 - \frac{2}{1 + t}} \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right) \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right)} \cdot \left(2 - \frac{2}{1 + t}\right)}\]
  5. Applied associate-*l*0.0

    \[\leadsto 1 - \frac{1}{2 + \color{blue}{\left(\sqrt[3]{2 - \frac{2}{1 + t}} \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right) \cdot \left(\sqrt[3]{2 - \frac{2}{1 + t}} \cdot \left(2 - \frac{2}{1 + t}\right)\right)}}\]
  6. Final simplification0.0

    \[\leadsto 1 - \frac{1}{\left(\sqrt[3]{2 - \frac{2}{1 + t}} \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right) \cdot \left(\left(2 - \frac{2}{1 + t}\right) \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right) + 2}\]

Reproduce

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

Details

Time bar (total: 14.2s)Debug log

sample48.0ms

Algorithm
intervals

simplify630.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

630.0ms
(- 1 (/ 1 (+ 2 (* (- 2 (/ (/ 2 t) (+ 1 (/ 1 t)))) (- 2 (/ (/ 2 t) (+ 1 (/ 1 t))))))))

prune13.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize38.0ms

Local error

Found 4 expressions with local error:

3.2b
(- 2 (/ 2 (+ 1 t)))
3.2b
(- 2 (/ 2 (+ 1 t)))
0.0b
(* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))
0.0b
(/ 2 (+ 1 t))

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
4 → 69
Calls

4 calls. Slowest were:

4.0ms
(* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))
4.0ms
(- 2 (/ 2 (+ 1 t)))
1.0ms
(- 2 (/ 2 (+ 1 t)))

series42.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

16.0ms
(* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))
10.0ms
(- 2 (/ 2 (+ 1 t)))
9.0ms
(- 2 (/ 2 (+ 1 t)))
7.0ms
(/ 2 (+ 1 t))

simplify6.7s

Counts
44 → 81
Calls

44 calls. Slowest were:

661.0ms
(* (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)) (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)))
649.0ms
(* (+ (* 2 2) (+ (* (/ 2 (+ 1 t)) (/ 2 (+ 1 t))) (* 2 (/ 2 (+ 1 t))))) (+ (* 2 2) (+ (* (/ 2 (+ 1 t)) (/ 2 (+ 1 t))) (* 2 (/ 2 (+ 1 t))))))
630.0ms
(* (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)) (- 2 (/ 2 (+ 1 t))))

prune719.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize24.0ms

Local error

Found 4 expressions with local error:

3.2b
(- 2 (/ 2 (+ 1 t)))
3.2b
(- 2 (/ 2 (+ 1 t)))
3.2b
(- 2 (/ 2 (+ 1 t)))
3.2b
(- 2 (/ 2 (+ 1 t)))

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

1.0ms
(- 2 (/ 2 (+ 1 t)))
1.0ms
(- 2 (/ 2 (+ 1 t)))
1.0ms
(- 2 (/ 2 (+ 1 t)))

series66.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

17.0ms
(- 2 (/ 2 (+ 1 t)))
17.0ms
(- 2 (/ 2 (+ 1 t)))
16.0ms
(- 2 (/ 2 (+ 1 t)))
15.0ms
(- 2 (/ 2 (+ 1 t)))

simplify3.2s

Counts
12 → 56
Calls

12 calls. Slowest were:

552.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
532.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
483.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune628.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

end0.0ms

sample2.0s

Algorithm
intervals