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

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

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

Reproduce

herbie shell --seed 2019005 
(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: 16.3s)Debug log

sample68.0ms

Algorithm
intervals

simplify484.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

484.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

localize35.0ms

Local error

Found 4 expressions with local error:

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

rewrite7.0ms

Algorithm
rewrite-expression-head
Counts
4 → 65
Calls

4 calls. Slowest were:

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

series51.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

21.0ms
(- 1 (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t)))))))
12.0ms
(* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))
9.0ms
(- 2 (/ 2 (+ 1 t)))
9.0ms
(- 2 (/ 2 (+ 1 t)))

simplify5.9s

Counts
39 → 77
Calls

39 calls. Slowest were:

618.0ms
(* (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)) (- 2 (/ 2 (+ 1 t))))
599.0ms
(* (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)) (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)))
558.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))))))

prune606.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize35.0ms

Local error

Found 4 expressions with local error:

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

rewrite3.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)))
0.0ms
(- 2 (/ 2 (+ 1 t)))

series37.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

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

simplify2.8s

Counts
12 → 56
Calls

12 calls. Slowest were:

498.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
485.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
435.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune531.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0.0b

localize14.0ms

Local error

Found 4 expressions with local error:

3.3b
(- 2 (/ 2 (+ 1 t)))
3.3b
(- 2 (/ 2 (+ 1 t)))
3.3b
(- 2 (/ 2 (+ 1 t)))
3.3b
(- 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)))

series62.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

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

simplify2.9s

Counts
12 → 56
Calls

12 calls. Slowest were:

527.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
508.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
454.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune610.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0.0b

regimes36.0ms

Accuracy

0% (0.0b remaining)

Error of 0.0b against oracle of 0.0b and baseline of 0.0b

bsearch5.0ms

end0.0ms

sample2.1s

Algorithm
intervals