Average Error: 1.0 → 0.0
Time: 7.0s
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)}}\]
\[\left(\frac{4}{\mathsf{fma}\left(v, v, 1\right)} \cdot \frac{\frac{1}{3 \cdot \pi}}{\left(1 - v \cdot v\right) \cdot \sqrt{2 - 6 \cdot \left(v \cdot v\right)}}\right) \cdot \left(1 + v \cdot v\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)}}
\left(\frac{4}{\mathsf{fma}\left(v, v, 1\right)} \cdot \frac{\frac{1}{3 \cdot \pi}}{\left(1 - v \cdot v\right) \cdot \sqrt{2 - 6 \cdot \left(v \cdot v\right)}}\right) \cdot \left(1 + v \cdot v\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 / fma(v, v, 1.0)) * ((1.0 / (3.0 * ((double) M_PI))) / ((1.0 - (v * v)) * sqrt((2.0 - (6.0 * (v * v))))))) * (1.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 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 \sqrt{2 - 6 \cdot \left(v \cdot v\right)}}\]
  4. 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 \sqrt{2 - 6 \cdot \left(v \cdot v\right)}}\]
  5. Applied associate-*l/1.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 - 6 \cdot \left(v \cdot v\right)}}{1 + v \cdot v}}}\]
  6. 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 - 6 \cdot \left(v \cdot v\right)}} \cdot \left(1 + v \cdot v\right)}\]
  7. 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 - 6 \cdot \left(v \cdot v\right)}\right)}} \cdot \left(1 + v \cdot v\right)\]
  8. Using strategy rm
  9. Applied div-inv0.0

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

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

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

Reproduce

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