Average Error: 1.0 → 0.0
Time: 43.2s
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{4}{3}}{\pi}}{\sqrt{1 - v \cdot v}}}{\sqrt{(-6 \cdot \left(v \cdot v\right) + 2)_*}} \cdot \frac{1}{\sqrt{1 - v \cdot v}}\]

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 *-un-lft-identity0.0

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

    \[\leadsto \frac{\frac{\frac{\frac{4}{3}}{\pi}}{1 - v \cdot v}}{\color{blue}{\sqrt{1} \cdot \sqrt{(-6 \cdot \left(v \cdot v\right) + 2)_*}}}\]
  6. 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{1} \cdot \sqrt{(-6 \cdot \left(v \cdot v\right) + 2)_*}}\]
  7. Applied *-un-lft-identity0.0

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

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

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

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

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

Reproduce

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

sample98.0ms

Algorithm
intervals
Results
41.0ms256×body80valid
38.0ms246×body80nan

simplify181.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
181.0ms
(/ 4 (* (* (* 3 PI) (- 1 (* v v))) (sqrt (- 2 (* 6 (* v v))))))

prune24.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize36.0ms

Local error

Found 2 expressions with local error:

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

rewrite9.0ms

Algorithm
rewrite-expression-head
Rules
192×times-frac
96×add-cube-cbrt
96×*-un-lft-identity
96×add-sqr-sqrt
57×sqrt-prod
30×div-inv
18×associate-/l*
14×associate-/r/
flip--
add-exp-log
add-cbrt-cube
flip3--
associate-/r*
div-exp
cbrt-undiv
add-log-exp
log1p-expm1-u
frac-2neg
clear-num
pow1
expm1-log1p-u
associate-/l/
Counts
2 → 161
Calls
2 calls:
Slowest
6.0ms
(/ (/ (/ 4/3 PI) (- 1 (* v v))) (sqrt (fma -6 (* v v) 2)))
0.0ms
(/ 4/3 PI)

series217.0ms

Counts
2 → 4
Calls
2 calls:
Slowest
217.0ms
(/ (/ (/ 4/3 PI) (- 1 (* v v))) (sqrt (fma -6 (* v v) 2)))
0.0ms
(/ 4/3 PI)

simplify21.4s

Counts
248 → 165
Calls
248 calls:
Slowest
613.0ms
(/ (/ (/ 1 PI) (- 1 (* v v))) (cbrt (sqrt (fma -6 (* v v) 2))))
445.0ms
(/ (/ (/ 4/3 PI) (- (pow 1 3) (pow (* v v) 3))) (sqrt (sqrt (fma -6 (* v v) 2))))
429.0ms
(/ (/ (/ 4/3 PI) (- (pow 1 3) (pow (* v v) 3))) (sqrt 1))
415.0ms
(/ (/ (/ 4/3 PI) (- (pow 1 3) (pow (* v v) 3))) 1)
392.0ms
(/ (/ (/ 4/3 PI) (- (* 1 1) (* (* v v) (* v v)))) (* (cbrt (sqrt (fma -6 (* v v) 2))) (cbrt (sqrt (fma -6 (* v v) 2)))))

prune1.8s

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize23.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 (- 1 (* v v)))
0.0b
(sqrt (- 1 (* v v)))

rewrite7.0ms

Algorithm
rewrite-expression-head
Rules
25×add-sqr-sqrt
24×times-frac
23×add-cube-cbrt
23×*-un-lft-identity
21×sqrt-prod
div-inv
add-exp-log
sqrt-div
add-cbrt-cube
associate-/r*
add-log-exp
associate-/l*
log1p-expm1-u
pow1
expm1-log1p-u
flip--
flip3--
associate-/r/
pow1/2
frac-2neg
clear-num
rem-sqrt-square
associate-/l/
div-exp
cbrt-undiv
Counts
4 → 95
Calls
4 calls:
Slowest
3.0ms
(/ (/ 4/3 PI) (sqrt (- 1 (* v v))))
1.0ms
(sqrt (- 1 (* v v)))
1.0ms
(sqrt (- 1 (* v v)))
0.0ms
(/ 4/3 PI)

series215.0ms

Counts
4 → 10
Calls
4 calls:
Slowest
149.0ms
(/ (/ 4/3 PI) (sqrt (- 1 (* v v))))
36.0ms
(sqrt (- 1 (* v v)))
29.0ms
(sqrt (- 1 (* v v)))
0.0ms
(/ 4/3 PI)

simplify4.3s

Counts
82 → 105
Calls
82 calls:
Slowest
663.0ms
(- (* 4/3 (/ (sqrt -1) (* v PI))) (+ (* 2/3 (/ 1 (* (pow v 5) (* (sqrt -1) PI)))) (+ (* 2/3 (/ 1 (* (pow v 3) (* (sqrt -1) PI)))) (* 1/6 (/ 1 (* (pow v 5) (* (pow (sqrt -1) 3) PI)))))))
454.0ms
(- (+ (* 2/3 (/ 1 (* (pow v 5) (* (sqrt -1) PI)))) (+ (* 2/3 (/ 1 (* (pow v 3) (* (sqrt -1) PI)))) (* 1/6 (/ 1 (* (pow v 5) (* (pow (sqrt -1) 3) PI)))))) (* 4/3 (/ (sqrt -1) (* v PI))))
392.0ms
(- (* 1/8 (/ 1 (* (pow v 3) (pow (sqrt -1) 3)))) (+ (* 1/2 (/ 1 (* v (sqrt -1)))) (* v (sqrt -1))))
351.0ms
(- (* 1/8 (/ 1 (* (pow v 3) (pow (sqrt -1) 3)))) (+ (* 1/2 (/ 1 (* v (sqrt -1)))) (* v (sqrt -1))))
323.0ms
(- (+ (* 1/2 (/ 1 (* v (sqrt -1)))) (* v (sqrt -1))) (* 1/8 (/ 1 (* (pow v 3) (pow (sqrt -1) 3)))))

prune1.3s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize35.0ms

Local error

Found 4 expressions with local error:

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

rewrite45.0ms

Algorithm
rewrite-expression-head
Rules
18×associate-*r/
13×flip--
13×flip3--
12×sqrt-div
11×add-exp-log
11×add-cbrt-cube
11×pow1
10×associate-*r*
associate-/r/
frac-times
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
add-log-exp
log1p-expm1-u
cbrt-unprod
prod-exp
associate-*l/
pow-prod-down
expm1-log1p-u
sqrt-prod
*-commutative
associate-*l*
distribute-lft-in
sub-neg
distribute-rgt-in
div-inv
frac-2neg
associate-/r*
clear-num
Counts
4 → 86
Calls
4 calls:
Slowest
20.0ms
(* (* (* 3 PI) (- 1 (* v v))) (sqrt (- 2 (* 6 (* v v)))))
8.0ms
(* (* 3 PI) (- 1 (* v v)))
7.0ms
(/ 4 (* (* (* 3 PI) (- 1 (* v v))) (sqrt (- 2 (* 6 (* v v))))))
2.0ms
(* 6 (* v v))

series507.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
194.0ms
(/ 4 (* (* (* 3 PI) (- 1 (* v v))) (sqrt (- 2 (* 6 (* v v))))))
153.0ms
(* (* 3 PI) (- 1 (* v v)))
150.0ms
(* (* (* 3 PI) (- 1 (* v v))) (sqrt (- 2 (* 6 (* v v)))))
11.0ms
(* 6 (* v v))

simplify8.9s

Counts
58 → 98
Calls
58 calls:
Slowest
852.0ms
(* (* (* (* 3 PI) (* 3 PI)) (* 3 PI)) (* (* (- 1 (* v v)) (- 1 (* v v))) (- 1 (* v v))))
590.0ms
(* (+ (* 1 1) (+ (* (* v v) (* v v)) (* 1 (* v v)))) (sqrt (+ 2 (* 6 (* v v)))))
486.0ms
(* (+ (* 1 1) (+ (* (* v v) (* v v)) (* 1 (* v v)))) (sqrt (+ 2 (* 6 (* v v)))))
439.0ms
(* (* (* 3 PI) (- (pow 1 3) (pow (* v v) 3))) (sqrt (- (pow 2 3) (pow (* 6 (* v v)) 3))))
416.0ms
(* (* (* 3 PI) (- (* 1 1) (* (* v v) (* v v)))) (sqrt (- (pow 2 3) (pow (* 6 (* v v)) 3))))

prune934.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes105.0ms

Accuracy

0% (0.0b remaining)

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

bsearch3.0ms

end0.0ms

sample2.9s

Algorithm
intervals
Results
1.6s8000×body80valid
1.1s7999×body80nan