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

Error

Bits error versus t

Derivation

  1. Initial program 0.0

    \[\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. Simplified0.0

    \[\leadsto \color{blue}{\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 *-un-lft-identity0.0

    \[\leadsto \frac{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{\color{blue}{1 \cdot \left(1 + t\right)}}\right) + 1)_*}{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{1 + t}\right) + 2)_*}\]
  5. Applied times-frac0.0

    \[\leadsto \frac{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \color{blue}{\left(\frac{t}{1} \cdot \frac{2}{1 + t}\right)} + 1)_*}{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{1 + t}\right) + 2)_*}\]
  6. Simplified0.0

    \[\leadsto \frac{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\color{blue}{t} \cdot \frac{2}{1 + t}\right) + 1)_*}{(\left(\frac{t \cdot 2}{1 + t}\right) \cdot \left(\frac{t \cdot 2}{1 + t}\right) + 2)_*}\]
  7. Final simplification0.0

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

Reproduce

herbie shell --seed 2019002 +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: 28.5s)Debug log

sample31.0ms

Algorithm
intervals

simplify655.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

655.0ms
(/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 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:

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

rewrite21.0ms

Algorithm
rewrite-expression-head
Counts
4 → 92
Calls

4 calls. Slowest were:

6.0ms
(/ (* t 2) (+ 1 t))
6.0ms
(/ (* t 2) (+ 1 t))
4.0ms
(/ (* t 2) (+ 1 t))

series49.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

16.0ms
(/ (* t 2) (+ 1 t))
12.0ms
(/ (* t 2) (+ 1 t))
11.0ms
(/ (* t 2) (+ 1 t))
10.0ms
(/ (* t 2) (+ 1 t))

simplify6.3s

Counts
64 → 104
Calls

64 calls. Slowest were:

755.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
748.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
713.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune946.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize22.0ms

Local error

Found 4 expressions with local error:

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

rewrite17.0ms

Algorithm
rewrite-expression-head
Counts
4 → 80
Calls

4 calls. Slowest were:

6.0ms
(/ (* t 2) (+ 1 t))
6.0ms
(/ (* t 2) (+ 1 t))
2.0ms
(* t (/ 2 (+ 1 t)))

series68.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

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

simplify6.2s

Counts
50 → 92
Calls

50 calls. Slowest were:

789.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
766.0ms
(- (+ (* 2 (/ 1 t)) (* 2 (/ 1 (pow t 3)))) (* 2 (/ 1 (pow t 2))))
725.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune895.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize21.0ms

Local error

Found 4 expressions with local error:

13.5b
(/ (* t 2) (- (* 1 1) (* t t)))
0.1b
(* (/ (* t 2) (- (* 1 1) (* t t))) (- 1 t))
0.0b
(/ (* t 2) (+ 1 t))
0.0b
(/ (* t 2) (+ 1 t))

rewrite23.0ms

Algorithm
rewrite-expression-head
Counts
4 → 108
Calls

4 calls. Slowest were:

8.0ms
(* (/ (* t 2) (- (* 1 1) (* t t))) (- 1 t))
6.0ms
(/ (* t 2) (+ 1 t))
4.0ms
(/ (* t 2) (- (* 1 1) (* t t)))

series70.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

22.0ms
(/ (* t 2) (- (* 1 1) (* t t)))
19.0ms
(* (/ (* t 2) (- (* 1 1) (* t t))) (- 1 t))
17.0ms
(/ (* t 2) (+ 1 t))
13.0ms
(/ (* t 2) (+ 1 t))

simplify10.2s

Counts
82 → 120
Calls

82 calls. Slowest were:

1.0s
(/ (* (* (* t 2) (* t 2)) (* t 2)) (* (* (- (* 1 1) (* t t)) (- (* 1 1) (* t t))) (- (* 1 1) (* t t))))
982.0ms
(- (+ (* 2 (/ 1 (pow t 5))) (+ (* 2 (/ 1 (pow t 3))) (* 2 (/ 1 t)))))
889.0ms
(- (+ (* 2 (/ 1 (pow t 5))) (+ (* 2 (/ 1 (pow t 3))) (* 2 (/ 1 t)))))

prune1.4s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes20.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms

end0.0ms

sample1.6s

Algorithm
intervals