Average Error: 12.1 → 0.5
Time: 51.3s
Precision: 64
Internal Precision: 128
\[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5\]
\[\left(3 + \frac{\frac{2}{r}}{r}\right) - (\left(\sqrt{\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}}} \cdot \sqrt{\sqrt[3]{\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}} \cdot \left(\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}} \cdot \frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}}\right)}}\right) \cdot \left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) + 4.5)_*\]

Error

Bits error versus v

Bits error versus w

Bits error versus r

Derivation

  1. Initial program 12.1

    \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5\]
  2. Simplified0.4

    \[\leadsto \color{blue}{\left(3 + \frac{2}{r \cdot r}\right) - (\left(\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}}\right) \cdot \left(\left(w \cdot r\right) \cdot \left(w \cdot r\right)\right) + 4.5)_*}\]
  3. Using strategy rm
  4. Applied associate-/r*0.4

    \[\leadsto \left(3 + \color{blue}{\frac{\frac{2}{r}}{r}}\right) - (\left(\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}}\right) \cdot \left(\left(w \cdot r\right) \cdot \left(w \cdot r\right)\right) + 4.5)_*\]
  5. Using strategy rm
  6. Applied add-sqr-sqrt0.4

    \[\leadsto \left(3 + \frac{\frac{2}{r}}{r}\right) - (\color{blue}{\left(\sqrt{\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}}} \cdot \sqrt{\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}}}\right)} \cdot \left(\left(w \cdot r\right) \cdot \left(w \cdot r\right)\right) + 4.5)_*\]
  7. Using strategy rm
  8. Applied add-cbrt-cube0.5

    \[\leadsto \left(3 + \frac{\frac{2}{r}}{r}\right) - (\left(\sqrt{\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}}} \cdot \sqrt{\color{blue}{\sqrt[3]{\left(\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}} \cdot \frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}}\right) \cdot \frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}}}}}\right) \cdot \left(\left(w \cdot r\right) \cdot \left(w \cdot r\right)\right) + 4.5)_*\]
  9. Final simplification0.5

    \[\leadsto \left(3 + \frac{\frac{2}{r}}{r}\right) - (\left(\sqrt{\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}}} \cdot \sqrt{\sqrt[3]{\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}} \cdot \left(\frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}} \cdot \frac{(-2 \cdot v + 3)_*}{\frac{1 - v}{0.125}}\right)}}\right) \cdot \left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) + 4.5)_*\]

Reproduce

herbie shell --seed 2019002 +o rules:numerics
(FPCore (v w r)
  :name "Rosa's TurbineBenchmark"
  (- (- (+ 3 (/ 2 (* r r))) (/ (* (* 0.125 (- 3 (* 2 v))) (* (* (* w w) r) r)) (- 1 v))) 4.5))

Details

Time bar (total: 50.0s)Debug log

sample318.0ms

Algorithm
intervals

simplify143.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

142.0ms
(- (- (+ 3 (/ 2 (* r r))) (/ (* (* 0.125 (- 3 (* 2 v))) (* (* (* w w) r) r)) (- 1 v))) 4.5)

prune38.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.2b

localize82.0ms

Local error

Found 4 expressions with local error:

0.5b
(/ 2 (* r r))
0.4b
(* (* w r) (* w r))
0.2b
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
0.1b
(fma (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (* (* w r) (* w r)) 4.5)

rewrite21.0ms

Algorithm
rewrite-expression-head
Counts
4 → 75
Calls

4 calls. Slowest were:

7.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
7.0ms
(* (* w r) (* w r))
3.0ms
(/ 2 (* r r))

series157.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

72.0ms
(fma (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (* (* w r) (* w r)) 4.5)
29.0ms
(/ 2 (* r r))
28.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
27.0ms
(* (* w r) (* w r))

simplify4.1s

Counts
50 → 87
Calls

50 calls. Slowest were:

718.0ms
(/ (* (* (fma -2 v 3) (fma -2 v 3)) (fma -2 v 3)) (* (* (/ (- 1 v) 0.125) (/ (- 1 v) 0.125)) (/ (- 1 v) 0.125)))
658.0ms
(- 0.25 (+ (* 0.125 (/ 1 v)) (* 0.125 (/ 1 (pow v 2)))))
633.0ms
(* (* (* (* w r) (* w r)) (* w r)) (* (* (* w r) (* w r)) (* w r)))

prune1.3s

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 0.0b

localize22.0ms

Local error

Found 4 expressions with local error:

0.4b
(* (* w r) (* w r))
0.2b
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
0.2b
(/ (/ 2 r) r)
0.1b
(fma (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (* (* w r) (* w r)) 4.5)

rewrite22.0ms

Algorithm
rewrite-expression-head
Counts
4 → 79
Calls

4 calls. Slowest were:

8.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
7.0ms
(* (* w r) (* w r))
5.0ms
(/ (/ 2 r) r)

series143.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

68.0ms
(fma (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (* (* w r) (* w r)) 4.5)
28.0ms
(* (* w r) (* w r))
27.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
19.0ms
(/ (/ 2 r) r)

simplify4.2s

Counts
52 → 91
Calls

52 calls. Slowest were:

771.0ms
(* (* (* (* w r) (* w r)) (* w r)) (* (* (* w r) (* w r)) (* w r)))
748.0ms
(/ (* (* (fma -2 v 3) (fma -2 v 3)) (fma -2 v 3)) (* (* (/ (- 1 v) 0.125) (/ (- 1 v) 0.125)) (/ (- 1 v) 0.125)))
643.0ms
(- 0.25 (+ (* 0.125 (/ 1 v)) (* 0.125 (/ 1 (pow v 2)))))

prune1.4s

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 0.0b

localize27.0ms

Local error

Found 4 expressions with local error:

0.5b
(* (sqrt (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (sqrt (/ (fma -2 v 3) (/ (- 1 v) 0.125))))
0.4b
(* (* w r) (* w r))
0.2b
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
0.2b
(/ (fma -2 v 3) (/ (- 1 v) 0.125))

rewrite36.0ms

Algorithm
rewrite-expression-head
Counts
4 → 149
Calls

4 calls. Slowest were:

13.0ms
(* (sqrt (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (sqrt (/ (fma -2 v 3) (/ (- 1 v) 0.125))))
8.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
7.0ms
(* (* w r) (* w r))

series121.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

62.0ms
(* (sqrt (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (sqrt (/ (fma -2 v 3) (/ (- 1 v) 0.125))))
21.0ms
(* (* w r) (* w r))
21.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
16.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))

simplify8.6s

Counts
137 → 161
Calls

137 calls. Slowest were:

957.0ms
(- 0.25 (+ (* 0.125 (/ 1 v)) (* 0.125 (/ 1 (pow v 2)))))
775.0ms
(/ (* (* (fma -2 v 3) (fma -2 v 3)) (fma -2 v 3)) (* (* (/ (- 1 v) 0.125) (/ (- 1 v) 0.125)) (/ (- 1 v) 0.125)))
671.0ms
(- 0.25 (+ (* 0.125 (/ 1 v)) (* 0.125 (/ 1 (pow v 2)))))

prune2.8s

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 0.0b

localize42.0ms

Local error

Found 4 expressions with local error:

0.5b
(cbrt (* (* (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (/ (fma -2 v 3) (/ (- 1 v) 0.125))))
0.5b
(* (sqrt (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (sqrt (cbrt (* (* (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (/ (fma -2 v 3) (/ (- 1 v) 0.125))))))
0.4b
(* (* w r) (* w r))
0.2b
(/ (fma -2 v 3) (/ (- 1 v) 0.125))

rewrite49.0ms

Algorithm
rewrite-expression-head
Counts
4 → 128
Calls

4 calls. Slowest were:

18.0ms
(cbrt (* (* (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (/ (fma -2 v 3) (/ (- 1 v) 0.125))))
12.0ms
(* (sqrt (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (sqrt (cbrt (* (* (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (/ (fma -2 v 3) (/ (- 1 v) 0.125))))))
6.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))

series216.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

96.0ms
(* (sqrt (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (sqrt (cbrt (* (* (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (/ (fma -2 v 3) (/ (- 1 v) 0.125))))))
72.0ms
(cbrt (* (* (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (/ (fma -2 v 3) (/ (- 1 v) 0.125))) (/ (fma -2 v 3) (/ (- 1 v) 0.125))))
28.0ms
(* (* w r) (* w r))
20.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))

simplify17.4s

Counts
112 → 140
Calls

112 calls. Slowest were:

724.0ms
(* (* (* (* w r) (* w r)) (* w r)) (* (* (* w r) (* w r)) (* w r)))
667.0ms
(/ (* (* (fma -2 v 3) (fma -2 v 3)) (fma -2 v 3)) (* (* (/ (- 1 v) 0.125) (/ (- 1 v) 0.125)) (/ (- 1 v) 0.125)))
652.0ms
(- 0.25 (+ (* 0.125 (/ 1 v)) (* 0.125 (/ 1 (pow v 2)))))

prune2.9s

Pruning

10 alts after pruning (9 fresh and 1 done)

Merged error: 0.0b

regimes534.0ms

Accuracy

0% (0.4b remaining)

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

bsearch6.0ms

end0.0ms

sample5.4s

Algorithm
intervals