Average Error: 34.8 → 34.8
Time: 36.3s
Precision: 64
\[\left(\left(\cosh c\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\]
\[\sqrt[3]{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot {\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}^{\frac{2}{3}}\]
\left(\left(\cosh c\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)
\sqrt[3]{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot {\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}^{\frac{2}{3}}
double f(double a, double c) {
        double r939957 = c;
        double r939958 = cosh(r939957);
        double r939959 = a;
        double r939960 = log1p(r939959);
        double r939961 = fmod(r939958, r939960);
        return r939961;
}

double f(double a, double c) {
        double r939962 = c;
        double r939963 = r939962 * r939962;
        double r939964 = 0.041666666666666664;
        double r939965 = 0.5;
        double r939966 = fma(r939964, r939963, r939965);
        double r939967 = log(r939966);
        double r939968 = exp(r939967);
        double r939969 = 1.0;
        double r939970 = fma(r939963, r939968, r939969);
        double r939971 = a;
        double r939972 = log1p(r939971);
        double r939973 = fmod(r939970, r939972);
        double r939974 = cbrt(r939973);
        double r939975 = 0.6666666666666666;
        double r939976 = pow(r939973, r939975);
        double r939977 = r939974 * r939976;
        return r939977;
}

Error

Bits error versus a

Bits error versus c

Derivation

  1. Initial program 34.8

    \[\left(\left(\cosh c\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\]
  2. Taylor expanded around 0 34.9

    \[\leadsto \left(\color{blue}{\left(\frac{1}{2} \cdot {c}^{2} + \left(\frac{1}{24} \cdot {c}^{4} + 1\right)\right)} \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\]
  3. Simplified34.8

    \[\leadsto \left(\color{blue}{\left(\mathsf{fma}\left(c \cdot c, \mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right), 1\right)\right)} \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\]
  4. Using strategy rm
  5. Applied add-exp-log34.8

    \[\leadsto \left(\left(\mathsf{fma}\left(c \cdot c, \color{blue}{e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\]
  6. Using strategy rm
  7. Applied add-cube-cbrt34.9

    \[\leadsto \color{blue}{\left(\sqrt[3]{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\right) \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\]
  8. Using strategy rm
  9. Applied pow1/334.9

    \[\leadsto \left(\sqrt[3]{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot \color{blue}{{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}^{\frac{1}{3}}}\right) \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\]
  10. Applied pow1/334.9

    \[\leadsto \left(\color{blue}{{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}^{\frac{1}{3}}} \cdot {\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}^{\frac{1}{3}}\right) \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\]
  11. Applied pow-prod-up34.8

    \[\leadsto \color{blue}{{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}^{\left(\frac{1}{3} + \frac{1}{3}\right)}} \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\]
  12. Simplified34.8

    \[\leadsto {\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}^{\color{blue}{\frac{2}{3}}} \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\]
  13. Final simplification34.8

    \[\leadsto \sqrt[3]{\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot {\left(\left(\mathsf{fma}\left(c \cdot c, e^{\log \left(\mathsf{fma}\left(\frac{1}{24}, c \cdot c, \frac{1}{2}\right)\right)}, 1\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}^{\frac{2}{3}}\]

Reproduce

herbie shell --seed 2019172 +o rules:numerics
(FPCore (a c)
  :name "Random Jason Timeout Test 004"
  (fmod (cosh c) (log1p a)))