Average Error: 34.4 → 34.5
Time: 14.2s
Precision: 64
\[\left(\left(\cosh c\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\]
\[\left(\sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot \sqrt[3]{\left(\sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\right) \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\right) \cdot \left(\sqrt[3]{\sqrt{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}} \cdot \sqrt[3]{\sqrt{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\right)\]
\left(\left(\cosh c\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)
\left(\sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot \sqrt[3]{\left(\sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\right) \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\right) \cdot \left(\sqrt[3]{\sqrt{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}} \cdot \sqrt[3]{\sqrt{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\right)
double code(double a, double c) {
	return ((double) fmod(((double) cosh(c)), ((double) log1p(a))));
}
double code(double a, double c) {
	return ((double) (((double) (((double) cbrt(((double) fmod(((double) fma(0.041666666666666664, ((double) pow(c, 4.0)), ((double) fma(0.5, ((double) pow(c, 2.0)), 1.0)))), ((double) log1p(a)))))) * ((double) cbrt(((double) (((double) (((double) cbrt(((double) fmod(((double) fma(0.041666666666666664, ((double) pow(c, 4.0)), ((double) fma(0.5, ((double) pow(c, 2.0)), 1.0)))), ((double) log1p(a)))))) * ((double) cbrt(((double) fmod(((double) fma(0.041666666666666664, ((double) pow(c, 4.0)), ((double) fma(0.5, ((double) pow(c, 2.0)), 1.0)))), ((double) log1p(a)))))))) * ((double) cbrt(((double) fmod(((double) fma(0.041666666666666664, ((double) pow(c, 4.0)), ((double) fma(0.5, ((double) pow(c, 2.0)), 1.0)))), ((double) log1p(a)))))))))))) * ((double) (((double) cbrt(((double) sqrt(((double) fmod(((double) fma(0.041666666666666664, ((double) pow(c, 4.0)), ((double) fma(0.5, ((double) pow(c, 2.0)), 1.0)))), ((double) log1p(a)))))))) * ((double) cbrt(((double) sqrt(((double) fmod(((double) fma(0.041666666666666664, ((double) pow(c, 4.0)), ((double) fma(0.5, ((double) pow(c, 2.0)), 1.0)))), ((double) log1p(a))))))))))));
}

Error

Bits error versus a

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 34.4

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

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

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

    \[\leadsto \color{blue}{\left(\sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\right) \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\]
  6. Using strategy rm
  7. Applied add-sqr-sqrt34.5

    \[\leadsto \left(\sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\right) \cdot \sqrt[3]{\color{blue}{\sqrt{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot \sqrt{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}}\]
  8. Applied cbrt-prod34.5

    \[\leadsto \left(\sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot \sqrt[3]{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\right) \cdot \color{blue}{\left(\sqrt[3]{\sqrt{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}} \cdot \sqrt[3]{\sqrt{\left(\left(\mathsf{fma}\left(\frac{1}{24}, {c}^{4}, \mathsf{fma}\left(\frac{1}{2}, {c}^{2}, 1\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\right)}\]
  9. Using strategy rm
  10. Applied add-cube-cbrt34.5

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

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

Reproduce

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