Average Error: 1.0 → 0.0
Time: 3.0s
Precision: binary64
\[\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{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1.3333333333333333}{\pi \cdot \left(1 - v \cdot v\right)}\right)\right)}{\sqrt{\mathsf{fma}\left(v \cdot v, -6, 2\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{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1.3333333333333333}{\pi \cdot \left(1 - v \cdot v\right)}\right)\right)}{\sqrt{\mathsf{fma}\left(v \cdot v, -6, 2\right)}}
(FPCore (v)
 :precision binary64
 (/ 4.0 (* (* (* 3.0 PI) (- 1.0 (* v v))) (sqrt (- 2.0 (* 6.0 (* v v)))))))
(FPCore (v)
 :precision binary64
 (/
  (log1p (expm1 (/ 1.3333333333333333 (* PI (- 1.0 (* v v))))))
  (sqrt (fma (* v v) -6.0 2.0))))
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 log1p(expm1((1.3333333333333333 / (((double) M_PI) * (1.0 - (v * v)))))) / sqrt(fma((v * v), -6.0, 2.0));
}

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{1.3333333333333333}{\pi \cdot \left(1 - v \cdot v\right)}}{\sqrt{\mathsf{fma}\left(v \cdot v, -6, 2\right)}}} \]
  3. Applied egg-rr0.0

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

    \[\leadsto \frac{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1.3333333333333333}{\pi \cdot \left(1 - v \cdot v\right)}\right)\right)}{\sqrt{\mathsf{fma}\left(v \cdot v, -6, 2\right)}} \]

Reproduce

herbie shell --seed 2022127 
(FPCore (v)
  :name "Falkner and Boettcher, Equation (22+)"
  :precision binary64
  (/ 4.0 (* (* (* 3.0 PI) (- 1.0 (* v v))) (sqrt (- 2.0 (* 6.0 (* v v)))))))