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

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. Final simplification0.0

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

Reproduce

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

sample42.0ms

Algorithm
intervals

simplify539.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune14.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:

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

rewrite15.0ms

Algorithm
rewrite-expression-head
Counts
4 → 72
Calls

4 calls. Slowest were:

9.0ms
(* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))
2.0ms
(/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))
1.0ms
(- 2 (/ 2 (+ 1 t)))

series71.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

23.0ms
(/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))
18.0ms
(* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))
16.0ms
(- 2 (/ 2 (+ 1 t)))
15.0ms
(- 2 (/ 2 (+ 1 t)))

simplify7.8s

Counts
45 → 84
Calls

45 calls. Slowest were:

619.0ms
(* (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)) (- 2 (/ 2 (+ 1 t))))
558.0ms
(* (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)) (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)))
543.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))))))

prune702.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize21.0ms

Local error

Found 4 expressions with local error:

4.6b
(- 2 (/ 2 (+ 1 t)))
4.6b
(- 2 (/ 2 (+ 1 t)))
1.0b
(log (exp (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))))
0.5b
(exp (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t)))))))

rewrite11.0ms

Algorithm
rewrite-expression-head
Counts
4 → 54
Calls

4 calls. Slowest were:

5.0ms
(log (exp (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))))
3.0ms
(exp (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t)))))))
1.0ms
(- 2 (/ 2 (+ 1 t)))

series95.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

43.0ms
(exp (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t)))))))
22.0ms
(log (exp (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))))
15.0ms
(- 2 (/ 2 (+ 1 t)))
15.0ms
(- 2 (/ 2 (+ 1 t)))

simplify6.5s

Counts
28 → 66
Calls

28 calls. Slowest were:

535.0ms
(- (+ (exp 1/6) (* 2/9 (/ (exp 1/6) t))) (* 1/81 (/ (exp 1/6) (pow t 2))))
521.0ms
(- (+ (exp 1/2) (* 2 (* (pow t 3) (exp 1/2)))) (* (pow t 2) (exp 1/2)))
440.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune609.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes36.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms

end0.0ms

sample1.5s

Algorithm
intervals