\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))))))))))));
}



Bits error versus a



Bits error versus c
Results
Initial program 34.4
Taylor expanded around 0 34.5
Simplified34.5
rmApplied add-cube-cbrt34.5
rmApplied add-sqr-sqrt34.5
Applied cbrt-prod34.5
rmApplied add-cube-cbrt34.5
Final simplification34.5
herbie shell --seed 2020123 +o rules:numerics
(FPCore (a c)
:name "Random Jason Timeout Test 004"
:precision binary64
(fmod (cosh c) (log1p a)))