Average Error: 1.0 → 0.0
Time: 1.1m
Precision: 64
Internal Precision: 128
\[\frac{4}{\left(\left(3 \cdot \pi\right) \cdot \left(1 - v \cdot v\right)\right) \cdot \sqrt{2 - 6 \cdot \left(v \cdot v\right)}}\]
\[\frac{\frac{\frac{\frac{\frac{4}{3}}{\pi}}{\sqrt{1 - v \cdot v}}}{\sqrt{1 - v \cdot v}}}{\sqrt{(-6 \cdot \left(v \cdot v\right) + 2)_*}}\]

Error

Bits error versus v

Derivation

  1. Initial program 1.0

    \[\frac{4}{\left(\left(3 \cdot \pi\right) \cdot \left(1 - v \cdot v\right)\right) \cdot \sqrt{2 - 6 \cdot \left(v \cdot v\right)}}\]
  2. Simplified0.0

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

    \[\leadsto \frac{\frac{\frac{\frac{4}{3}}{\pi}}{\color{blue}{\sqrt{1 - v \cdot v} \cdot \sqrt{1 - v \cdot v}}}}{\sqrt{(-6 \cdot \left(v \cdot v\right) + 2)_*}}\]
  5. Applied associate-/r*0.0

    \[\leadsto \frac{\color{blue}{\frac{\frac{\frac{\frac{4}{3}}{\pi}}{\sqrt{1 - v \cdot v}}}{\sqrt{1 - v \cdot v}}}}{\sqrt{(-6 \cdot \left(v \cdot v\right) + 2)_*}}\]
  6. Final simplification0.0

    \[\leadsto \frac{\frac{\frac{\frac{\frac{4}{3}}{\pi}}{\sqrt{1 - v \cdot v}}}{\sqrt{1 - v \cdot v}}}{\sqrt{(-6 \cdot \left(v \cdot v\right) + 2)_*}}\]

Reproduce

herbie shell --seed 2019007 +o rules:numerics
(FPCore (v)
  :name "Falkner and Boettcher, Equation (22+)"
  (/ 4 (* (* (* 3 PI) (- 1 (* v v))) (sqrt (- 2 (* 6 (* v v)))))))

Details

Time bar (total: 1.1m)Debug log

sample140.0ms

Algorithm
intervals

simplify131.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

130.0ms
(/ 4 (* (* (* 3 PI) (- 1 (* v v))) (sqrt (- 2 (* 6 (* v v))))))

prune14.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize34.0ms

Local error

Found 4 expressions with local error:

1.0b
(/ 4/3 PI)
0.0b
(/ (/ 4/3 PI) (- 1 (* v v)))
0.0b
(sqrt (fma -6 (* v v) 2))
0.0b
(fma -6 (* v v) 2)

rewrite9.0ms

Algorithm
rewrite-expression-head
Counts
4 → 72
Calls

4 calls. Slowest were:

6.0ms
(/ (/ 4/3 PI) (- 1 (* v v)))
1.0ms
(sqrt (fma -6 (* v v) 2))
0.0ms
(/ 4/3 PI)

series151.0ms

Counts
4 → 10
Calls

4 calls. Slowest were:

93.0ms
(/ (/ 4/3 PI) (- 1 (* v v)))
30.0ms
(sqrt (fma -6 (* v v) 2))
28.0ms
(fma -6 (* v v) 2)
0.0ms
(/ 4/3 PI)

simplify3.7s

Counts
47 → 82
Calls

47 calls. Slowest were:

799.0ms
(- (+ (* 4/3 (/ 1 (* (pow v 2) PI))) (+ (* 4/3 (/ 1 (* (pow v 4) PI))) (* 4/3 (/ 1 (* (pow v 6) PI))))))
646.0ms
(- (+ (* 4/3 (/ 1 (* (pow v 2) PI))) (+ (* 4/3 (/ 1 (* (pow v 4) PI))) (* 4/3 (/ 1 (* (pow v 6) PI))))))
362.0ms
(+ (* 4/3 (/ (pow v 2) PI)) (+ (* 4/3 (/ 1 PI)) (* 4/3 (/ (pow v 4) PI))))

prune960.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize22.0ms

Local error

Found 4 expressions with local error:

1.0b
(/ 4/3 PI)
0.0b
(/ (/ 4/3 PI) (sqrt (- 1 (* v v))))
0.0b
(sqrt (fma -6 (* v v) 2))
0.0b
(/ (/ (/ 4/3 PI) (sqrt (- 1 (* v v)))) (sqrt (- 1 (* v v))))

rewrite39.0ms

Algorithm
rewrite-expression-head
Counts
4 → 312
Calls

4 calls. Slowest were:

16.0ms
(/ (/ (/ 4/3 PI) (sqrt (- 1 (* v v)))) (sqrt (- 1 (* v v))))
8.0ms
(/ (/ 4/3 PI) (sqrt (- 1 (* v v))))
2.0ms
(sqrt (fma -6 (* v v) 2))

series251.0ms

Counts
4 → 10
Calls

4 calls. Slowest were:

127.0ms
(/ (/ 4/3 PI) (sqrt (- 1 (* v v))))
81.0ms
(/ (/ (/ 4/3 PI) (sqrt (- 1 (* v v)))) (sqrt (- 1 (* v v))))
42.0ms
(sqrt (fma -6 (* v v) 2))
0.0ms
(/ 4/3 PI)

simplify18.4s

Counts
476 → 322
Calls

476 calls. Slowest were:

788.0ms
(- (+ (* 4/3 (/ 1 (* (pow v 2) PI))) (+ (* 4/3 (/ 1 (* (pow v 4) PI))) (* 4/3 (/ 1 (* (pow v 6) PI))))))
739.0ms
(- (+ (* 4/3 (/ 1 (* (pow v 2) PI))) (+ (* 4/3 (/ 1 (* (pow v 4) PI))) (* 4/3 (/ 1 (* (pow v 6) PI))))))
588.0ms
(/ (* (* (/ (/ 4/3 PI) (sqrt (- 1 (* v v)))) (/ (/ 4/3 PI) (sqrt (- 1 (* v v))))) (/ (/ 4/3 PI) (sqrt (- 1 (* v v))))) (* (* (sqrt (- 1 (* v v))) (sqrt (- 1 (* v v)))) (sqrt (- 1 (* v v)))))

prune3.9s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize34.0ms

Local error

Found 4 expressions with local error:

0.0b
(/ (/ 1 PI) (sqrt (cbrt (- 1 (* v v)))))
0.0b
(* (/ (/ 4/3 (fabs (cbrt (- 1 (* v v))))) (sqrt (sqrt (- 1 (* v v))))) (/ (/ (/ 1 PI) (sqrt (cbrt (- 1 (* v v))))) (sqrt (sqrt (- 1 (* v v))))))
0.0b
(/ (/ 4/3 (fabs (cbrt (- 1 (* v v))))) (sqrt (sqrt (- 1 (* v v)))))
0.0b
(sqrt (fma -6 (* v v) 2))

rewrite70.0ms

Algorithm
rewrite-expression-head
Counts
4 → 598
Calls

4 calls. Slowest were:

30.0ms
(* (/ (/ 4/3 (fabs (cbrt (- 1 (* v v))))) (sqrt (sqrt (- 1 (* v v))))) (/ (/ (/ 1 PI) (sqrt (cbrt (- 1 (* v v))))) (sqrt (sqrt (- 1 (* v v))))))
8.0ms
(/ (/ 1 PI) (sqrt (cbrt (- 1 (* v v)))))
4.0ms
(/ (/ 4/3 (fabs (cbrt (- 1 (* v v))))) (sqrt (sqrt (- 1 (* v v)))))

series611.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

215.0ms
(/ (/ 1 PI) (sqrt (cbrt (- 1 (* v v)))))
188.0ms
(/ (/ 4/3 (fabs (cbrt (- 1 (* v v))))) (sqrt (sqrt (- 1 (* v v)))))
173.0ms
(* (/ (/ 4/3 (fabs (cbrt (- 1 (* v v))))) (sqrt (sqrt (- 1 (* v v))))) (/ (/ (/ 1 PI) (sqrt (cbrt (- 1 (* v v))))) (sqrt (sqrt (- 1 (* v v))))))
34.0ms
(sqrt (fma -6 (* v v) 2))

simplify25.4s

Counts
632 → 610
Calls

632 calls. Slowest were:

603.0ms
(/ (* (* (/ 1 PI) (/ 1 PI)) (/ 1 PI)) (* (* (sqrt (cbrt (- 1 (* v v)))) (sqrt (cbrt (- 1 (* v v))))) (sqrt (cbrt (- 1 (* v v))))))
567.0ms
(+ (* 20/27 (* (pow (/ 1 (pow v 16)) 1/3) (/ 1 (* (fabs (pow (- 1 (pow v 2)) 1/3)) PI)))) (+ (* 4/3 (* (pow (/ 1 (pow v 4)) 1/3) (/ 1 (* (fabs (pow (- 1 (pow v 2)) 1/3)) PI)))) (* 8/9 (* (pow (/ 1 (pow v 10)) 1/3) (/ 1 (* (fabs (pow (- 1 (pow v 2)) 1/3)) PI))))))
546.0ms
(+ (* 20/27 (* (pow (/ 1 (pow v 16)) 1/3) (/ 1 (* (fabs (pow (- 1 (pow v 2)) 1/3)) PI)))) (+ (* 4/3 (* (pow (/ 1 (pow v 4)) 1/3) (/ 1 (* (fabs (pow (- 1 (pow v 2)) 1/3)) PI)))) (* 8/9 (* (pow (/ 1 (pow v 10)) 1/3) (/ 1 (* (fabs (pow (- 1 (pow v 2)) 1/3)) PI))))))

prune10.7s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes43.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms

end0.0ms

sample2.6s

Algorithm
intervals