Average Error: 34.8 → 34.8
Time: 36.5s
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 r939955 = c;
        double r939956 = cosh(r939955);
        double r939957 = a;
        double r939958 = log1p(r939957);
        double r939959 = fmod(r939956, r939958);
        return r939959;
}

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

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)))