Average Error: 0.1 → 0.1
Time: 1.2m
Precision: 64
Internal Precision: 128
\[\frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\]
\[\log \left(e^{\frac{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{1 + t}\right) + 1)_*}{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{1 + t}\right) + 2)_*}}\right)\]

Error

Bits error versus t

Derivation

  1. Initial program 0.1

    \[\frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\]
  2. Initial simplification0.1

    \[\leadsto \frac{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{1 + t}\right) + 1)_*}{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{1 + t}\right) + 2)_*}\]
  3. Using strategy rm
  4. Applied add-log-exp0.1

    \[\leadsto \color{blue}{\log \left(e^{\frac{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{1 + t}\right) + 1)_*}{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{1 + t}\right) + 2)_*}}\right)}\]
  5. Final simplification0.1

    \[\leadsto \log \left(e^{\frac{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{1 + t}\right) + 1)_*}{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{1 + t}\right) + 2)_*}}\right)\]

Reproduce

herbie shell --seed 2018365 +o rules:numerics
(FPCore (t)
  :name "Kahan p13 Example 1"
  (/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))))

Details

Time bar (total: 1.2m)Debug log

start77.0ms

Algorithm
intervals

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

0.0b
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))
0.0b
(fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)
0.0b
(/ (* t 2) (+ 1 t))
0.0b
(/ (* t 2) (+ 1 t))

rewrite20.0ms

Algorithm
rewrite-expression-head
Counts
4 → 85
Calls

4 calls. Slowest were:

7.0ms
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))
6.0ms
(/ (* t 2) (+ 1 t))
6.0ms
(/ (* t 2) (+ 1 t))

series103.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

52.0ms
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))
23.0ms
(fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)
17.0ms
(/ (* t 2) (+ 1 t))
11.0ms
(/ (* t 2) (+ 1 t))

simplify11.4s

Counts
63 → 97
Calls

63 calls. Slowest were:

767.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
676.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
420.0ms
(/ (cbrt (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)) (cbrt (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))

prune1.1s

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize16.0ms

Local error

Found 4 expressions with local error:

0.0b
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))
0.0b
(log (exp (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))))
0.0b
(exp (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))
0.0b
(fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)

rewrite23.0ms

Algorithm
rewrite-expression-head
Counts
4 → 89
Calls

4 calls. Slowest were:

8.0ms
(log (exp (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))))
7.0ms
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))
6.0ms
(exp (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))

series248.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

87.0ms
(exp (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))
74.0ms
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))
63.0ms
(log (exp (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))))
23.0ms
(fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)

simplify18.5s

Counts
68 → 101
Calls

68 calls. Slowest were:

724.0ms
(exp (/ (sqrt (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)) (* (cbrt (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)) (cbrt (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))))
462.0ms
(/ (* (* (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)) (* (* (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))
429.0ms
(sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))

prune1.5s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize12.0ms

Local error

Found 4 expressions with local error:

0.5b
(* (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))) (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))))
0.0b
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))
0.0b
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))
0.0b
(fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)

rewrite16.0ms

Algorithm
rewrite-expression-head
Counts
4 → 123
Calls

4 calls. Slowest were:

6.0ms
(* (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))) (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))))
5.0ms
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))
3.0ms
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))

series257.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

81.0ms
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))
77.0ms
(/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))
60.0ms
(* (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))) (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))))
39.0ms
(fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)

simplify33.1s

Counts
109 → 135
Calls

109 calls. Slowest were:

1.1s
(* (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)) (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))
1.1s
(* (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)) (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))
770.0ms
(* (* (* (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))) (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))) (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))) (* (* (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2))) (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))) (sqrt (/ (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1) (fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)))))

prune1.9s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes24.0ms

Accuracy

0% (0.0b remaining)

Error of 0.1b against oracle of 0.1b and baseline of 0.1b

bsearch1.0ms