Average Error: 0.5 → 0.7
Time: 1.2m
Precision: 64
Internal Precision: 128
\[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\]
\[\cos^{-1} \left((\left((\left(v \cdot v\right) \cdot \left(v \cdot v\right) + \left(v \cdot v\right))_*\right) \cdot 4 + -1)_*\right)\]

Error

Bits error versus v

Derivation

  1. Initial program 0.5

    \[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\]
  2. Simplified0.5

    \[\leadsto \color{blue}{\cos^{-1} \left(\frac{(-5 \cdot \left(v \cdot v\right) + 1)_*}{v \cdot v - 1}\right)}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity0.5

    \[\leadsto \cos^{-1} \left(\frac{\color{blue}{1 \cdot (-5 \cdot \left(v \cdot v\right) + 1)_*}}{v \cdot v - 1}\right)\]
  5. Applied associate-/l*0.5

    \[\leadsto \cos^{-1} \color{blue}{\left(\frac{1}{\frac{v \cdot v - 1}{(-5 \cdot \left(v \cdot v\right) + 1)_*}}\right)}\]
  6. Taylor expanded around 0 0.7

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

    \[\leadsto \cos^{-1} \color{blue}{\left((\left((\left(v \cdot v\right) \cdot \left(v \cdot v\right) + \left(v \cdot v\right))_*\right) \cdot 4 + -1)_*\right)}\]
  8. Final simplification0.7

    \[\leadsto \cos^{-1} \left((\left((\left(v \cdot v\right) \cdot \left(v \cdot v\right) + \left(v \cdot v\right))_*\right) \cdot 4 + -1)_*\right)\]

Reproduce

herbie shell --seed 2019089 +o rules:numerics
(FPCore (v)
  :name "Falkner and Boettcher, Appendix B, 1"
  (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))