Average Error: 0.0 → 0.0
Time: 26.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 - \log_* (1 + (e^{\frac{1}{(\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) + 2)_*}} - 1)^*)\]

Error

Bits error versus t

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}{(\left(2 - \frac{2}{1 + t}\right) \cdot \left(2 - \frac{2}{1 + t}\right) + 2)_*}}\]
  3. Using strategy rm
  4. Applied log1p-expm1-u0.0

    \[\leadsto 1 - \color{blue}{\log_* (1 + (e^{\frac{1}{(\left(2 - \frac{2}{1 + t}\right) \cdot \left(2 - \frac{2}{1 + t}\right) + 2)_*}} - 1)^*)}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt0.0

    \[\leadsto 1 - \log_* (1 + (e^{\frac{1}{(\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) + 2)_*}} - 1)^*)\]
  7. Final simplification0.0

    \[\leadsto 1 - \log_* (1 + (e^{\frac{1}{(\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) + 2)_*}} - 1)^*)\]

Reproduce

herbie shell --seed 2019010 +o rules:numerics
(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.5s)Debug log

sample58.0ms

Algorithm
intervals

simplify1.0s

Counts
1 → 1
Calls
1 calls:
Slowest
1.0s
(- 1 (/ 1 (+ 2 (* (- 2 (/ (/ 2 t) (+ 1 (/ 1 t)))) (- 2 (/ (/ 2 t) (+ 1 (/ 1 t))))))))

prune11.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
(- 1 (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))
0.0b
(/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))

rewrite3.0ms

Algorithm
rewrite-expression-head
Rules
add-cube-cbrt
add-exp-log
*-un-lft-identity
pow1
add-sqr-sqrt
add-log-exp
log1p-expm1-u
add-cbrt-cube
expm1-log1p-u
flip--
flip3--
sub-neg
associate-/r*
inv-pow
pow-flip
div-inv
frac-2neg
clear-num
rec-exp
Counts
4 → 57
Calls
4 calls:
Slowest
1.0ms
(- 1 (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))
1.0ms
(/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
1.0ms
(- 2 (/ 2 (+ 1 t)))
0.0ms
(- 2 (/ 2 (+ 1 t)))

series75.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
27.0ms
(- 1 (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))
24.0ms
(/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
13.0ms
(- 2 (/ 2 (+ 1 t)))
11.0ms
(- 2 (/ 2 (+ 1 t)))

simplify5.4s

Counts
16 → 69
Calls
16 calls:
Slowest
1.0s
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
779.0ms
(fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)
753.0ms
(cbrt (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
623.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
618.0ms
(sqrt (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))

prune720.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0b

localize12.0ms

Local error

Found 4 expressions with local error:

2.3b
(- 2 (/ 2 (+ 1 t)))
2.3b
(- 2 (/ 2 (+ 1 t)))
0.0b
(log1p (expm1 (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))))
0.0b
(/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))

rewrite2.0ms

Algorithm
rewrite-expression-head
Rules
add-cube-cbrt
add-exp-log
*-un-lft-identity
pow1
add-sqr-sqrt
add-log-exp
log1p-expm1-u
add-cbrt-cube
expm1-log1p-u
associate-/r*
flip--
flip3--
sub-neg
inv-pow
pow-flip
div-inv
log1p-expm1
frac-2neg
clear-num
log1p-udef
rec-exp
Counts
4 → 55
Calls
4 calls:
Slowest
1.0ms
(/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
0.0ms
(- 2 (/ 2 (+ 1 t)))
0.0ms
(- 2 (/ 2 (+ 1 t)))
0.0ms
(log1p (expm1 (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))))

series143.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
99.0ms
(log1p (expm1 (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))))
24.0ms
(/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
10.0ms
(- 2 (/ 2 (+ 1 t)))
9.0ms
(- 2 (/ 2 (+ 1 t)))

simplify4.9s

Counts
16 → 67
Calls
16 calls:
Slowest
767.0ms
(cbrt (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
713.0ms
(sqrt (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
652.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
610.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
609.0ms
(fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)

prune704.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

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

rewrite4.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
flip--
log1p-expm1-u
add-cube-cbrt
add-exp-log
add-cbrt-cube
flip3--
*-un-lft-identity
sub-neg
pow1
expm1-log1p-u
add-sqr-sqrt
Counts
4 → 52
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)))

series46.0ms

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

simplify4.6s

Counts
12 → 64
Calls
12 calls:
Slowest
697.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
672.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
627.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
574.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
311.0ms
(- (+ (* 2 (/ 1 (pow t 2))) 2) (* 2 (/ 1 t)))

prune773.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

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

rewrite2.0ms

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

series62.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
19.0ms
(- 2 (/ 2 (+ 1 t)))
17.0ms
(- 2 (/ 2 (+ 1 t)))
14.0ms
(- 2 (/ 2 (+ 1 t)))
12.0ms
(- 2 (/ 2 (+ 1 t)))

simplify4.4s

Counts
12 → 64
Calls
12 calls:
Slowest
701.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
633.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
600.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
558.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
283.0ms
(- (+ (* 2 (/ 1 (pow t 2))) 2) (* 2 (/ 1 t)))

prune702.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes41.0ms

Accuracy

0% (0.0b remaining)

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

bsearch3.0ms

end0.0ms

sample1.8s

Algorithm
intervals