\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\frac{\pi}{2} - \sin^{-1} \left(\left(\sqrt{1} + \sqrt{5} \cdot v\right) \cdot \frac{\sqrt{1} - \sqrt{5} \cdot v}{v \cdot v - 1}\right)double code(double v) {
return acos(((1.0 - (5.0 * (v * v))) / ((v * v) - 1.0)));
}
double code(double v) {
return ((((double) M_PI) / 2.0) - asin(((sqrt(1.0) + (sqrt(5.0) * v)) * ((sqrt(1.0) - (sqrt(5.0) * v)) / ((v * v) - 1.0)))));
}



Bits error versus v
Results
Initial program 0.6
rmApplied *-un-lft-identity0.6
Applied add-sqr-sqrt0.6
Applied unswap-sqr0.6
Applied add-sqr-sqrt0.6
Applied difference-of-squares0.7
Applied times-frac0.7
Simplified0.7
rmApplied acos-asin0.7
Final simplification0.7
herbie shell --seed 2020066
(FPCore (v)
:name "Falkner and Boettcher, Appendix B, 1"
:precision binary64
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))