Average Error: 1.0 → 0.0
Time: 6.9s
Precision: 64
\[\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{4}{3 \cdot \pi}}{\mathsf{fma}\left(v, v, 1\right) \cdot \left(\left(1 - v \cdot v\right) \cdot \sqrt{{2}^{3} - {\left(6 \cdot \left(v \cdot v\right)\right)}^{3}}\right)} \cdot \left(\left(1 + v \cdot v\right) \cdot \sqrt{2 \cdot 2 + \left(\left(6 \cdot \left(v \cdot v\right)\right) \cdot \left(6 \cdot \left(v \cdot v\right)\right) + 2 \cdot \left(6 \cdot \left(v \cdot v\right)\right)\right)}\right)\]
\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{4}{3 \cdot \pi}}{\mathsf{fma}\left(v, v, 1\right) \cdot \left(\left(1 - v \cdot v\right) \cdot \sqrt{{2}^{3} - {\left(6 \cdot \left(v \cdot v\right)\right)}^{3}}\right)} \cdot \left(\left(1 + v \cdot v\right) \cdot \sqrt{2 \cdot 2 + \left(\left(6 \cdot \left(v \cdot v\right)\right) \cdot \left(6 \cdot \left(v \cdot v\right)\right) + 2 \cdot \left(6 \cdot \left(v \cdot v\right)\right)\right)}\right)
double code(double v) {
	return (4.0 / (((3.0 * ((double) M_PI)) * (1.0 - (v * v))) * sqrt((2.0 - (6.0 * (v * v))))));
}
double code(double v) {
	return (((4.0 / (3.0 * ((double) M_PI))) / (fma(v, v, 1.0) * ((1.0 - (v * v)) * sqrt((pow(2.0, 3.0) - pow((6.0 * (v * v)), 3.0)))))) * ((1.0 + (v * v)) * sqrt(((2.0 * 2.0) + (((6.0 * (v * v)) * (6.0 * (v * v))) + (2.0 * (6.0 * (v * v))))))));
}

Error

Bits error versus v

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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. Using strategy rm
  3. Applied flip3--1.0

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

    \[\leadsto \frac{4}{\left(\left(3 \cdot \pi\right) \cdot \left(1 - v \cdot v\right)\right) \cdot \color{blue}{\frac{\sqrt{{2}^{3} - {\left(6 \cdot \left(v \cdot v\right)\right)}^{3}}}{\sqrt{2 \cdot 2 + \left(\left(6 \cdot \left(v \cdot v\right)\right) \cdot \left(6 \cdot \left(v \cdot v\right)\right) + 2 \cdot \left(6 \cdot \left(v \cdot v\right)\right)\right)}}}}\]
  5. Applied flip--1.0

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

    \[\leadsto \frac{4}{\color{blue}{\frac{\left(3 \cdot \pi\right) \cdot \left(1 \cdot 1 - \left(v \cdot v\right) \cdot \left(v \cdot v\right)\right)}{1 + v \cdot v}} \cdot \frac{\sqrt{{2}^{3} - {\left(6 \cdot \left(v \cdot v\right)\right)}^{3}}}{\sqrt{2 \cdot 2 + \left(\left(6 \cdot \left(v \cdot v\right)\right) \cdot \left(6 \cdot \left(v \cdot v\right)\right) + 2 \cdot \left(6 \cdot \left(v \cdot v\right)\right)\right)}}}\]
  7. Applied frac-times1.0

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

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

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

    \[\leadsto \frac{\frac{4}{3 \cdot \pi}}{\mathsf{fma}\left(v, v, 1\right) \cdot \left(\left(1 - v \cdot v\right) \cdot \sqrt{{2}^{3} - {\left(6 \cdot \left(v \cdot v\right)\right)}^{3}}\right)} \cdot \left(\left(1 + v \cdot v\right) \cdot \sqrt{2 \cdot 2 + \left(\left(6 \cdot \left(v \cdot v\right)\right) \cdot \left(6 \cdot \left(v \cdot v\right)\right) + 2 \cdot \left(6 \cdot \left(v \cdot v\right)\right)\right)}\right)\]

Reproduce

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