Average Error: 0.1 → 0.1
Time: 1.0m
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 2018365 
(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: 59.3s)Debug log

start64.0ms

Algorithm
intervals

setup555.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize23.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))

rewrite55.0ms

Algorithm
rewrite-expression-head
Counts
4 → 134
Calls

4 calls. Slowest were:

21.0ms
(/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))
13.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
13.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

series79.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

35.0ms
(/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))
16.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
15.0ms
(/ (* 2 t) (+ 1 t))
13.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

simplify25.0s

Counts
120 → 146
Calls

120 calls. Slowest were:

929.0ms
(+ (pow 1 3) (pow (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) 3))
821.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))))
768.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

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize25.0ms

Local error

Found 4 expressions with local error:

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

rewrite26.0ms

Algorithm
rewrite-expression-head
Counts
4 → 106
Calls

4 calls. Slowest were:

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

series61.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

24.0ms
(exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))
13.0ms
(log (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))
12.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
12.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

simplify11.1s

Counts
87 → 118
Calls

87 calls. Slowest were:

783.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))))
761.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))))
571.0ms
(log (sqrt (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))))

prune1.5s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize80.0ms

Local error

Found 4 expressions with local error:

0.1b
(pow (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) 3)
0.0b
(pow (/ (* 2 t) (+ t 1)) 4)
0.0b
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
0.0b
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

rewrite57.0ms

Algorithm
rewrite-expression-head
Counts
4 → 132
Calls

4 calls. Slowest were:

22.0ms
(pow (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) 3)
13.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
13.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

series89.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

27.0ms
(pow (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) 3)
22.0ms
(pow (/ (* 2 t) (+ t 1)) 4)
21.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
20.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

simplify15.2s

Counts
110 → 144
Calls

110 calls. Slowest were:

1.2s
(* (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))) (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))))
974.0ms
(pow (* (* 2 t) (/ (* 2 t) (+ 1 t))) 3)
850.0ms
(pow (* (/ (* 2 t) (+ 1 t)) (* 2 t)) 3)

prune3.5s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes144.0ms

Accuracy

0% (0.0b remaining)

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

bsearch3.0ms