Average Error: 12.4 → 0.4
Time: 39.5s
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{2}{r \cdot r}\right) - \left(4.5 + \left(r \cdot w\right) \cdot \left((-2 \cdot v + 3)_* \cdot \left(\frac{1}{\frac{1 - v}{0.125}} \cdot \left(r \cdot w\right)\right)\right)\right)\]

Error

Bits error versus v

Bits error versus w

Bits error versus r

Derivation

  1. Initial program 12.4

    \[\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 fma-udef0.4

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

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

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

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

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

Reproduce

herbie shell --seed 2019007 +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: 38.4s)Debug log

sample348.0ms

Algorithm
intervals

simplify101.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune27.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.5b

localize53.0ms

Local error

Found 4 expressions with local error:

0.4b
(* (* w r) (* w r))
0.3b
(/ 2 (* r 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)

rewrite22.0ms

Algorithm
rewrite-expression-head
Counts
4 → 75
Calls

4 calls. Slowest were:

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

series116.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

56.0ms
(fma (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (* (* w r) (* w r)) 4.5)
29.0ms
(* (* w r) (* w r))
19.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
12.0ms
(/ 2 (* r r))

simplify3.8s

Counts
50 → 87
Calls

50 calls. Slowest were:

627.0ms
(- 0.25 (+ (* 0.125 (/ 1 v)) (* 0.125 (/ 1 (pow v 2)))))
616.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)))
568.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.1b

localize10.0ms

Local error

Found 4 expressions with local error:

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

rewrite25.0ms

Algorithm
rewrite-expression-head
Counts
4 → 104
Calls

4 calls. Slowest were:

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

series113.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

59.0ms
(* (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (* (* w r) (* w r)))
23.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
20.0ms
(* (* w r) (* w r))
11.0ms
(/ 2 (* r r))

simplify7.0s

Counts
78 → 116
Calls

78 calls. Slowest were:

708.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)))
637.0ms
(* (* (* (* w r) (* w r)) (* w r)) (* (* (* w r) (* w r)) (* w r)))
567.0ms
(- 0.25 (+ (* 0.125 (/ 1 v)) (* 0.125 (/ 1 (pow v 2)))))

prune1.9s

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 0.1b

localize18.0ms

Local error

Found 4 expressions with local error:

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

rewrite36.0ms

Algorithm
rewrite-expression-head
Counts
4 → 102
Calls

4 calls. Slowest were:

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

series144.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

64.0ms
(* (* (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (* w r)) (* w r))
51.0ms
(* (/ (fma -2 v 3) (/ (- 1 v) 0.125)) (* w r))
16.0ms
(/ (fma -2 v 3) (/ (- 1 v) 0.125))
12.0ms
(/ 2 (* r r))

simplify7.6s

Counts
76 → 114
Calls

76 calls. Slowest were:

757.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)))
529.0ms
(- 0.25 (+ (* 0.125 (/ 1 v)) (* 0.125 (/ 1 (pow v 2)))))
517.0ms
(- 0.25 (+ (* 0.125 (/ 1 v)) (* 0.125 (/ 1 (pow v 2)))))

prune1.6s

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 0.0b

localize26.0ms

Local error

Found 4 expressions with local error:

6.5b
(* (fma -2 v 3) (* (/ 1 (/ (- 1 v) 0.125)) (* w r)))
0.3b
(* (* (fma -2 v 3) (* (/ 1 (/ (- 1 v) 0.125)) (* w r))) (* w r))
0.3b
(/ 2 (* r r))
0.2b
(/ 1 (/ (- 1 v) 0.125))

rewrite75.0ms

Algorithm
rewrite-expression-head
Counts
4 → 78
Calls

4 calls. Slowest were:

50.0ms
(* (* (fma -2 v 3) (* (/ 1 (/ (- 1 v) 0.125)) (* w r))) (* w r))
21.0ms
(* (fma -2 v 3) (* (/ 1 (/ (- 1 v) 0.125)) (* w r)))
2.0ms
(/ 1 (/ (- 1 v) 0.125))

series150.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

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

simplify6.6s

Counts
40 → 90
Calls

40 calls. Slowest were:

528.0ms
(+ (log (fma -2 v 3)) (+ (log (/ 1 (/ (- 1 v) 0.125))) (log (* w r))))
489.0ms
(* (fma -2 v 3) (* (/ 1 (/ (- 1 v) 0.125)) (* w r)))
447.0ms
(+ (log (* (fma -2 v 3) (* (/ 1 (/ (- 1 v) 0.125)) (* w r)))) (log (* w r)))

prune1.4s

Pruning

10 alts after pruning (9 fresh and 1 done)

Merged error: 0.0b

regimes264.0ms

Accuracy

0% (0.3b remaining)

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

bsearch3.0ms

end0.0ms

sample5.7s

Algorithm
intervals