Average Error: 0.1 → 0.1
Time: 1.8m
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 2019004 
(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.8m)Debug log

sample27.0ms

Algorithm
intervals

simplify451.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune5.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize20.0ms

Local error

Found 4 expressions with local error:

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

rewrite48.0ms

Algorithm
rewrite-expression-head
Counts
4 → 123
Calls

4 calls. Slowest were:

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

series96.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

31.0ms
(/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))
23.0ms
(+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))
21.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
21.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

simplify22.5s

Counts
107 → 135
Calls

107 calls. Slowest were:

737.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))))
626.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))))
555.0ms
(+ (pow 1 3) (pow (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) 3))

prune1.2s

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize15.0ms

Local error

Found 4 expressions with local error:

2.0b
(log (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))
0.0b
(/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (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)))

rewrite50.0ms

Algorithm
rewrite-expression-head
Counts
4 → 127
Calls

4 calls. Slowest were:

16.0ms
(/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (log (exp (* (/ (* 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)))

series106.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

33.0ms
(/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (log (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))))
30.0ms
(log (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))
22.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
21.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

simplify25.5s

Counts
113 → 139
Calls

113 calls. Slowest were:

808.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))))
756.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))))
699.0ms
(/ (* (cbrt (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))) (cbrt (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))) (* (cbrt (+ 2 (log (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))))) (cbrt (+ 2 (log (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))))))

prune1.5s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize19.0ms

Local error

Found 4 expressions with local error:

0.1b
(* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (* (/ (* 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)) (/ (* 2 t) (+ 1 t)))

rewrite69.0ms

Algorithm
rewrite-expression-head
Counts
4 → 223
Calls

4 calls. Slowest were:

36.0ms
(* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))
13.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
7.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

series83.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

24.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
21.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
20.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
18.0ms
(* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))

simplify49.5s

Counts
228 → 235
Calls

228 calls. Slowest were:

974.0ms
(* (* (+ 1 t) (+ 1 t)) (* (+ 1 t) (+ 1 t)))
952.0ms
(* (* (/ (* (* (* 2 t) (* 2 t)) (* 2 t)) (* (* (+ 1 t) (+ 1 t)) (+ 1 t))) (/ (* (* (* 2 t) (* 2 t)) (* 2 t)) (* (* (+ 1 t) (+ 1 t)) (+ 1 t)))) (* (/ (* (* (* 2 t) (* 2 t)) (* 2 t)) (* (* (+ 1 t) (+ 1 t)) (+ 1 t))) (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t)))))
864.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)))) (* (/ (* (* (* 2 t) (* 2 t)) (* 2 t)) (* (* (+ 1 t) (+ 1 t)) (+ 1 t))) (/ (* (* (* 2 t) (* 2 t)) (* 2 t)) (* (* (+ 1 t) (+ 1 t)) (+ 1 t)))))

prune2.4s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes72.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms

end0.0ms

sample1.4s

Algorithm
intervals