Average Error: 0.1 → 0.1
Time: 1.4m
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 +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: 1.4m)Debug log

start59.0ms

Algorithm
intervals

setup707.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

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

rewrite60.0ms

Algorithm
rewrite-expression-head
Counts
4 → 142
Calls

4 calls. Slowest were:

23.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)))
12.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

series71.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

34.0ms
(/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))
12.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
12.0ms
(/ (* 2 t) (+ 1 t))
12.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

simplify27.8s

Counts
120 → 154
Calls

120 calls. Slowest were:

919.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))))))
769.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) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune1.6s

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

rewrite22.0ms

Algorithm
rewrite-expression-head
Counts
4 → 114
Calls

4 calls. Slowest were:

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

series71.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

23.0ms
(exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))
19.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
17.0ms
(log (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))
12.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))

simplify12.1s

Counts
87 → 126
Calls

87 calls. Slowest were:

850.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))))
725.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))))
653.0ms
(log (* (cbrt (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))) (cbrt (exp (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))))))

prune1.6s

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

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

rewrite35.0ms

Algorithm
rewrite-expression-head
Counts
4 → 132
Calls

4 calls. Slowest were:

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

series78.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

27.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
21.0ms
(* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))
18.0ms
(/ (* t 2) (+ 1 t))
12.0ms
(/ (* 2 t) (+ 1 t))

simplify12.5s

Counts
104 → 144
Calls

104 calls. Slowest were:

857.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))))
771.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))))
703.0ms
(* (* (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))) (/ (* 2 t) (+ 1 t))) (/ (* (* (* 2 t) (* 2 t)) (* 2 t)) (* (* (+ 1 t) (+ 1 t)) (+ 1 t))))

prune2.1s

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

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

rewrite71.0ms

Algorithm
rewrite-expression-head
Counts
4 → 294
Calls

4 calls. Slowest were:

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

series99.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

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

simplify19.9s

Counts
338 → 306
Calls

338 calls. Slowest were:

1.5s
(/ (* (* (/ (* 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)) (* (* (+ 1 t) (+ 1 t)) (+ 1 t))) (/ (* (* (/ (* 2 t) (sqrt (+ 1 t))) (/ (* 2 t) (sqrt (+ 1 t)))) (/ (* 2 t) (sqrt (+ 1 t)))) (* (* (sqrt (+ 1 t)) (sqrt (+ 1 t))) (sqrt (+ 1 t)))))

prune4.4s

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes129.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms