Average Error: 34.8 → 34.8
Time: 39.0s
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 r624429 = c;
        double r624430 = cosh(r624429);
        double r624431 = a;
        double r624432 = log1p(r624431);
        double r624433 = fmod(r624430, r624432);
        return r624433;
}

double f(double a, double c) {
        double r624434 = c;
        double r624435 = r624434 * r624434;
        double r624436 = 0.041666666666666664;
        double r624437 = 0.5;
        double r624438 = fma(r624436, r624435, r624437);
        double r624439 = log(r624438);
        double r624440 = exp(r624439);
        double r624441 = 1.0;
        double r624442 = fma(r624435, r624440, r624441);
        double r624443 = a;
        double r624444 = log1p(r624443);
        double r624445 = fmod(r624442, r624444);
        double r624446 = cbrt(r624445);
        double r624447 = 0.6666666666666666;
        double r624448 = pow(r624445, r624447);
        double r624449 = r624446 * r624448;
        return r624449;
}

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