Average Error: 0.5 → 0.5
Time: 5.5s
Precision: binary64
\[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\]
\[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v + -1}\right)\]
\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)
\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v + -1}\right)
(FPCore (v)
 :precision binary64
 (acos (/ (- 1.0 (* 5.0 (* v v))) (- (* v v) 1.0))))
(FPCore (v)
 :precision binary64
 (acos (/ (- 1.0 (* 5.0 (* v v))) (+ (* 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 acos((1.0 - (5.0 * (v * v))) / ((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. Using strategy rm
  3. Applied flip--_binary640.5

    \[\leadsto \cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{\color{blue}{\frac{\left(v \cdot v\right) \cdot \left(v \cdot v\right) - 1 \cdot 1}{v \cdot v + 1}}}\right)\]
  4. Applied associate-/r/_binary640.5

    \[\leadsto \cos^{-1} \color{blue}{\left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(v \cdot v\right) \cdot \left(v \cdot v\right) - 1 \cdot 1} \cdot \left(v \cdot v + 1\right)\right)}\]
  5. Simplified0.5

    \[\leadsto \cos^{-1} \left(\color{blue}{\frac{1 - 5 \cdot \left(v \cdot v\right)}{-1 + {v}^{4}}} \cdot \left(v \cdot v + 1\right)\right)\]
  6. Using strategy rm
  7. Applied pow1_binary640.5

    \[\leadsto \cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{-1 + {v}^{4}} \cdot \color{blue}{{\left(v \cdot v + 1\right)}^{1}}\right)\]
  8. Applied pow1_binary640.5

    \[\leadsto \cos^{-1} \left(\color{blue}{{\left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{-1 + {v}^{4}}\right)}^{1}} \cdot {\left(v \cdot v + 1\right)}^{1}\right)\]
  9. Applied pow-prod-down_binary640.5

    \[\leadsto \cos^{-1} \color{blue}{\left({\left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{-1 + {v}^{4}} \cdot \left(v \cdot v + 1\right)\right)}^{1}\right)}\]
  10. Simplified0.5

    \[\leadsto \cos^{-1} \left({\color{blue}{\left(1 \cdot \frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v + -1}\right)}}^{1}\right)\]
  11. Final simplification0.5

    \[\leadsto \cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v + -1}\right)\]

Reproduce

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