Average Error: 0.1 → 0.1
Time: 1.3m
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{1 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}{\log \left(e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 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.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. Using strategy rm
  3. Applied add-log-exp0.1

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

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

Reproduce

herbie shell --seed 2018362 
(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.3m)Debug log

start46.0ms

Algorithm
intervals

setup590.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize41.0ms

Local error

Found 4 expressions with local error:

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

rewrite61.0ms

Algorithm
rewrite-expression-head
Counts
4 → 134
Calls

4 calls. Slowest were:

22.0ms
(/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))
15.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
15.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

series92.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

32.0ms
(/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))
26.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
18.0ms
(/ (* 2 t) (+ 1 t))
15.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

simplify24.2s

Counts
120 → 146
Calls

120 calls. Slowest were:

710.0ms
(* (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))) (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))))
668.0ms
(* (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))) (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))))
660.0ms
(+ (* 2 2) (- (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (* 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))))

prune1.5s

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0b

localize12.0ms

Local error

Found 4 expressions with local error:

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

rewrite23.0ms

Algorithm
rewrite-expression-head
Counts
4 → 106
Calls

4 calls. Slowest were:

10.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
7.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
3.0ms
(log (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))

series70.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

25.0ms
(exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))
18.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
13.0ms
(log (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))
13.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

simplify10.5s

Counts
87 → 118
Calls

87 calls. Slowest were:

734.0ms
(* (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))) (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))))
692.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
687.0ms
(* (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))) (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))))

prune1.7s

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize22.0ms

Local error

Found 4 expressions with local error:

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

rewrite56.0ms

Algorithm
rewrite-expression-head
Counts
4 → 144
Calls

4 calls. Slowest were:

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

series64.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

21.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
20.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
12.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
11.0ms
(/ (* 2 t) (+ 1 t))

simplify13.8s

Counts
124 → 156
Calls

124 calls. Slowest were:

781.0ms
(* (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))) (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))))
723.0ms
(* (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))) (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))))
704.0ms
(* (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))) (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))))

prune2.2s

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize16.0ms

Local error

Found 4 expressions with local error:

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

rewrite52.0ms

Algorithm
rewrite-expression-head
Counts
4 → 286
Calls

4 calls. Slowest were:

21.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (/ (* 2 t) (sqrt (+ 1 t))) (sqrt (+ 1 t))))
12.0ms
(/ (/ (* 2 t) (sqrt (+ 1 t))) (sqrt (+ 1 t)))
7.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

series105.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

44.0ms
(/ (* 2 t) (sqrt (+ 1 t)))
22.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (/ (* 2 t) (sqrt (+ 1 t))) (sqrt (+ 1 t))))
21.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
18.0ms
(/ (/ (* 2 t) (sqrt (+ 1 t))) (sqrt (+ 1 t)))

simplify17.9s

Counts
338 → 298
Calls

338 calls. Slowest were:

1.4s
(/ (* (* (/ (* 2 t) (sqrt (+ 1 t))) (/ (* 2 t) (sqrt (+ 1 t)))) (/ (* 2 t) (sqrt (+ 1 t)))) (* (* (sqrt (+ 1 t)) (sqrt (+ 1 t))) (sqrt (+ 1 t))))
1.1s
(* (/ (* (* (* 2 t) (* 2 t)) (* 2 t)) (* (* (+ 1 t) (+ 1 t)) (+ 1 t))) (/ (/ (* (* (* 2 t) (* 2 t)) (* 2 t)) (* (* (sqrt (+ 1 t)) (sqrt (+ 1 t))) (sqrt (+ 1 t)))) (* (* (sqrt (+ 1 t)) (sqrt (+ 1 t))) (sqrt (+ 1 t)))))
849.0ms
(/ (* (* (* 2 t) (* 2 t)) (* 2 t)) (* (* (sqrt (+ 1 t)) (sqrt (+ 1 t))) (sqrt (+ 1 t))))

prune4.2s

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes166.0ms

Accuracy

0% (0.0b remaining)

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

bsearch3.0ms