Average Error: 0.0 → 0.0
Time: 9.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(\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)_*}\]

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. Initial simplification0.0

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

    \[\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)_*}\]

Runtime

Time bar (total: 9.8s)Debug log

start74.0ms

Algorithm
intervals

setup726.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize24.0ms

Local error

Found 4 expressions with local error:

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

rewrite7.0ms

Algorithm
rewrite-expression-head
Counts
4 → 66
Calls

4 calls. Slowest were:

3.0ms
(/ (* t 2) (+ 1 t))
3.0ms
(/ (* t 2) (+ 1 t))
0.0ms
(fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)

series99.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

37.0ms
(fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 1)
37.0ms
(fma (/ (* t 2) (+ 1 t)) (/ (* t 2) (+ 1 t)) 2)
14.0ms
(/ (* t 2) (+ 1 t))

simplify3.9s

Counts
38 → 78
Calls

38 calls. Slowest were:

772.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
747.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
319.0ms
(- (+ (* 2 (/ 1 (pow t 2))) 2) (* 2 (/ 1 t)))

prune902.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

herbie shell --seed 2018359 +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))))))