Average Error: 0.6 → 0.8
Time: 8.6s
Precision: 64
\[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\]
\[{e}^{\left(\log \left(\cos^{-1} \left(\mathsf{fma}\left(4, \mathsf{fma}\left(v, v, {v}^{4}\right), -1\right)\right)\right)\right)}\]
\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)
{e}^{\left(\log \left(\cos^{-1} \left(\mathsf{fma}\left(4, \mathsf{fma}\left(v, v, {v}^{4}\right), -1\right)\right)\right)\right)}
double f(double v) {
        double r539 = 1.0;
        double r540 = 5.0;
        double r541 = v;
        double r542 = r541 * r541;
        double r543 = r540 * r542;
        double r544 = r539 - r543;
        double r545 = r542 - r539;
        double r546 = r544 / r545;
        double r547 = acos(r546);
        return r547;
}

double f(double v) {
        double r548 = exp(1.0);
        double r549 = 4.0;
        double r550 = v;
        double r551 = 4.0;
        double r552 = pow(r550, r551);
        double r553 = fma(r550, r550, r552);
        double r554 = 1.0;
        double r555 = -r554;
        double r556 = fma(r549, r553, r555);
        double r557 = acos(r556);
        double r558 = log(r557);
        double r559 = pow(r548, r558);
        return r559;
}

Error

Bits error versus v

Derivation

  1. Initial program 0.6

    \[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\]
  2. Using strategy rm
  3. Applied log1p-expm1-u0.6

    \[\leadsto \cos^{-1} \color{blue}{\left(\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\right)\right)}\]
  4. Using strategy rm
  5. Applied add-exp-log0.6

    \[\leadsto \color{blue}{e^{\log \left(\cos^{-1} \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\right)\right)\right)}}\]
  6. Using strategy rm
  7. Applied pow10.6

    \[\leadsto e^{\log \color{blue}{\left({\left(\cos^{-1} \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\right)\right)\right)}^{1}\right)}}\]
  8. Applied log-pow0.6

    \[\leadsto e^{\color{blue}{1 \cdot \log \left(\cos^{-1} \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\right)\right)\right)}}\]
  9. Applied exp-prod0.6

    \[\leadsto \color{blue}{{\left(e^{1}\right)}^{\left(\log \left(\cos^{-1} \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\right)\right)\right)\right)}}\]
  10. Simplified0.6

    \[\leadsto {\color{blue}{e}}^{\left(\log \left(\cos^{-1} \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\right)\right)\right)\right)}\]
  11. Taylor expanded around 0 0.8

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

    \[\leadsto {e}^{\left(\log \left(\cos^{-1} \color{blue}{\left(\mathsf{fma}\left(4, \mathsf{fma}\left(v, v, {v}^{4}\right), -1\right)\right)}\right)\right)}\]
  13. Final simplification0.8

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

Reproduce

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