Average Error: 0.0 → 0.0
Time: 26.1s
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 2019010 
(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: 25.6s)Debug log

sample60.0ms

Algorithm
intervals

simplify418.0ms

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

prune9.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize22.0ms

Local error

Found 4 expressions with local error:

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

rewrite7.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
4.0ms
(* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))
1.0ms
(/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))
1.0ms
(- 2 (/ 2 (+ 1 t)))
0.0ms
(- 2 (/ 2 (+ 1 t)))

series61.0ms

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

simplify7.7s

Counts
45 → 84
Calls
45 calls:
Slowest
687.0ms
(sqrt (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))
593.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))))
545.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
530.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))))))

prune751.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0b

localize37.0ms

Local error

Found 4 expressions with local error:

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

rewrite5.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)))

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

simplify2.7s

Counts
12 → 56
Calls
12 calls:
Slowest
481.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
456.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
453.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
393.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
147.0ms
(- (+ (* 2 (/ 1 (pow t 2))) 2) (* 2 (/ 1 t)))

prune657.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize63.0ms

Local error

Found 4 expressions with local error:

2.3b
(+ (/ 4 (+ t 1)) -4)
2.3b
(- 2 (/ 2 (+ 1 t)))
2.3b
(- 2 (/ 2 (+ 1 t)))
2.3b
(- 2 (/ 2 (+ t 1)))

rewrite7.0ms

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

series46.0ms

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

simplify2.9s

Counts
12 → 55
Calls
12 calls:
Slowest
526.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
476.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
373.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
337.0ms
(- (* 4 (pow t 2)) (+ (* 4 t) (* 4 (pow t 3))))
214.0ms
(- (* 4 (/ 1 t)) (+ (* 4 (/ 1 (pow t 2))) 4))

prune1.0s

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize15.0ms

Local error

Found 4 expressions with local error:

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

rewrite6.0ms

Algorithm
rewrite-expression-head
Rules
12×exp-prod
add-cube-cbrt
log-pow
*-un-lft-identity
add-sqr-sqrt
add-log-exp
pow1
associate-/r/
add-exp-log
add-cbrt-cube
log-prod
flip--
div-inv
flip-+
flip3--
flip3-+
sub-neg
rem-exp-log
rem-log-exp
Counts
4 → 54
Calls
4 calls:
Slowest
2.0ms
(log (exp (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))))
2.0ms
(exp (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t)))))))
1.0ms
(- 2 (/ 2 (+ 1 t)))
0.0ms
(- 2 (/ 2 (+ 1 t)))

series115.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
58.0ms
(exp (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t)))))))
32.0ms
(log (exp (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))))
15.0ms
(- 2 (/ 2 (+ 1 t)))
9.0ms
(- 2 (/ 2 (+ 1 t)))

simplify6.3s

Counts
28 → 66
Calls
28 calls:
Slowest
506.0ms
(- (+ (exp 1/2) (* 2 (* (pow t 3) (exp 1/2)))) (* (pow t 2) (exp 1/2)))
491.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
430.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
399.0ms
(/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))
379.0ms
(exp (* (cbrt (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))))))) (cbrt (/ 1 (+ 2 (* (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t)))))))))

prune655.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes23.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.9s

Algorithm
intervals