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

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

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

Reproduce

herbie shell --seed 2019016 
(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.4s)Debug log

sample44.0ms

Algorithm
intervals
Results
256×(pre true 80)
256×(body real 80)

simplify455.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
455.0ms
(- 1 (/ 1 (+ 2 (* (- 2 (/ (/ 2 t) (+ 1 (/ 1 t)))) (- 2 (/ (/ 2 t) (+ 1 (/ 1 t))))))))

prune7.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize30.0ms

Local error

Found 4 expressions with local error:

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

rewrite14.0ms

Algorithm
rewrite-expression-head
Rules
10×pow1
flip--
flip3--
add-cube-cbrt
add-exp-log
*-un-lft-identity
add-sqr-sqrt
add-cbrt-cube
add-log-exp
sub-neg
frac-times
associate-*l*
associate-*r*
associate-/r*
associate-/r/
associate-*r/
associate-*l/
distribute-lft-in
distribute-rgt-in
inv-pow
pow-flip
div-inv
flip-+
cbrt-unprod
pow-prod-up
*-commutative
prod-exp
pow-prod-down
pow-plus
flip3-+
frac-2neg
clear-num
rec-exp
pow2
Counts
4 → 72
Calls
4 calls:
Slowest
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)))
1.0ms
(- 2 (/ 2 (+ 1 t)))

series65.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
30.0ms
(/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))
14.0ms
(- 2 (/ 2 (+ 1 t)))
12.0ms
(* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))
9.0ms
(- 2 (/ 2 (+ 1 t)))

simplify7.7s

Counts
45 → 84
Calls
45 calls:
Slowest
678.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))))))
639.0ms
(* (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)) (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)))
581.0ms
(* (- (pow 2 3) (pow (/ 2 (+ 1 t)) 3)) (- 2 (/ 2 (+ 1 t))))
485.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
452.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune793.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize35.0ms

Local error

Found 4 expressions with local error:

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

rewrite4.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
flip--
add-cube-cbrt
add-exp-log
add-cbrt-cube
flip3--
*-un-lft-identity
sub-neg
pow1
add-sqr-sqrt
Counts
4 → 44
Calls
4 calls:
Slowest
1.0ms
(- 2 (/ 2 (+ 1 t)))
1.0ms
(- 2 (/ 2 (+ 1 t)))
1.0ms
(- 2 (/ 2 (+ 1 t)))
1.0ms
(- 2 (/ 2 (+ 1 t)))

series59.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
16.0ms
(- 2 (/ 2 (+ 1 t)))
16.0ms
(- 2 (/ 2 (+ 1 t)))
15.0ms
(- 2 (/ 2 (+ 1 t)))
12.0ms
(- 2 (/ 2 (+ 1 t)))

simplify2.9s

Counts
12 → 56
Calls
12 calls:
Slowest
456.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
442.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
436.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
420.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
170.0ms
(- (+ (* 2 (/ 1 (pow t 2))) 2) (* 2 (/ 1 t)))

prune588.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize37.0ms

Local error

Found 4 expressions with local error:

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

rewrite2.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
flip--
add-cube-cbrt
add-exp-log
add-cbrt-cube
flip3--
*-un-lft-identity
sub-neg
pow1
add-sqr-sqrt
Counts
4 → 44
Calls
4 calls:
Slowest
1.0ms
(- 2 (/ 2 (+ 1 t)))
0.0ms
(- 2 (/ 2 (+ 1 t)))
0.0ms
(- 2 (/ 2 (+ 1 t)))
0.0ms
(- 2 (/ 2 (+ 1 t)))

series45.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
13.0ms
(- 2 (/ 2 (+ 1 t)))
13.0ms
(- 2 (/ 2 (+ 1 t)))
10.0ms
(- 2 (/ 2 (+ 1 t)))
9.0ms
(- 2 (/ 2 (+ 1 t)))

simplify2.9s

Counts
12 → 56
Calls
12 calls:
Slowest
514.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
482.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
422.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
405.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
169.0ms
(- (+ (* 2 (/ 1 (pow t 2))) 2) (* 2 (/ 1 t)))

prune619.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes18.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms

end0.0ms

sample2.1s

Algorithm
intervals
Results
8000×(pre true 80)
8000×(body real 80)