Average Error: 0.5 → 0.9
Time: 4.7s
Precision: binary64
\[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\]
\[{e}^{\log \cos^{-1} \left(4 \cdot \left(v \cdot v\right) - 1\right)}\]
\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)
{e}^{\log \cos^{-1} \left(4 \cdot \left(v \cdot v\right) - 1\right)}
(FPCore (v)
 :precision binary64
 (acos (/ (- 1.0 (* 5.0 (* v v))) (- (* v v) 1.0))))
(FPCore (v) :precision binary64 (pow E (log (acos (- (* 4.0 (* v v)) 1.0)))))
double code(double v) {
	return acos((1.0 - (5.0 * (v * v))) / ((v * v) - 1.0));
}
double code(double v) {
	return pow(((double) M_E), log(acos((4.0 * (v * v)) - 1.0)));
}

Error

Bits error versus v

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.5

    \[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\]
  2. Taylor expanded around 0 0.9

    \[\leadsto \cos^{-1} \color{blue}{\left(4 \cdot {v}^{2} - 1\right)}\]
  3. Simplified0.9

    \[\leadsto \cos^{-1} \color{blue}{\left(-1 + \left(v \cdot v\right) \cdot 4\right)}\]
  4. Using strategy rm
  5. Applied add-exp-log_binary640.9

    \[\leadsto \color{blue}{e^{\log \cos^{-1} \left(-1 + \left(v \cdot v\right) \cdot 4\right)}}\]
  6. Simplified0.9

    \[\leadsto e^{\color{blue}{\log \cos^{-1} \left(4 \cdot \left(v \cdot v\right) - 1\right)}}\]
  7. Using strategy rm
  8. Applied pow1_binary640.9

    \[\leadsto e^{\log \color{blue}{\left({\cos^{-1} \left(4 \cdot \left(v \cdot v\right) - 1\right)}^{1}\right)}}\]
  9. Applied log-pow_binary640.9

    \[\leadsto e^{\color{blue}{1 \cdot \log \cos^{-1} \left(4 \cdot \left(v \cdot v\right) - 1\right)}}\]
  10. Applied exp-prod_binary640.9

    \[\leadsto \color{blue}{{\left(e^{1}\right)}^{\log \cos^{-1} \left(4 \cdot \left(v \cdot v\right) - 1\right)}}\]
  11. Simplified0.9

    \[\leadsto {\color{blue}{e}}^{\log \cos^{-1} \left(4 \cdot \left(v \cdot v\right) - 1\right)}\]
  12. Using strategy rm
  13. Applied pow1_binary640.9

    \[\leadsto {\color{blue}{\left({e}^{1}\right)}}^{\log \cos^{-1} \left(4 \cdot \left(v \cdot v\right) - 1\right)}\]
  14. Applied pow-pow_binary640.9

    \[\leadsto \color{blue}{{e}^{\left(1 \cdot \log \cos^{-1} \left(4 \cdot \left(v \cdot v\right) - 1\right)\right)}}\]
  15. Final simplification0.9

    \[\leadsto {e}^{\log \cos^{-1} \left(4 \cdot \left(v \cdot v\right) - 1\right)}\]

Reproduce

herbie shell --seed 2021174 
(FPCore (v)
  :name "Falkner and Boettcher, Appendix B, 1"
  :precision binary64
  (acos (/ (- 1.0 (* 5.0 (* v v))) (- (* v v) 1.0))))