Average Error: 34.1 → 34.1
Time: 15.0s
Precision: 64
\[\left(\left(\cosh c\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\]
\[{\left(e^{\sqrt[3]{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\right)}^{\left(\sqrt[3]{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right) \cdot \log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\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(e^{\sqrt[3]{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\right)}^{\left(\sqrt[3]{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right) \cdot \log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\right)}
double code(double a, double c) {
	return fmod(cosh(c), log1p(a));
}
double code(double a, double c) {
	return pow(exp(cbrt(log(fmod(expm1(log1p(cosh(c))), log1p(a))))), cbrt((log(fmod(expm1(log1p(cosh(c))), log1p(a))) * log(fmod(expm1(log1p(cosh(c))), 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.1

    \[\left(\left(\cosh c\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\]
  2. Using strategy rm
  3. Applied expm1-log1p-u34.1

    \[\leadsto \left(\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right)} \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\]
  4. Using strategy rm
  5. Applied add-exp-log34.1

    \[\leadsto \color{blue}{e^{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\]
  6. Using strategy rm
  7. Applied add-cbrt-cube34.1

    \[\leadsto e^{\color{blue}{\sqrt[3]{\left(\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right) \cdot \log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\right) \cdot \log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}}\]
  8. Simplified34.1

    \[\leadsto e^{\sqrt[3]{\color{blue}{{\left(\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\right)}^{3}}}}\]
  9. Using strategy rm
  10. Applied cube-mult34.1

    \[\leadsto e^{\sqrt[3]{\color{blue}{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right) \cdot \left(\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right) \cdot \log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)\right)}}}\]
  11. Applied cbrt-prod34.1

    \[\leadsto e^{\color{blue}{\sqrt[3]{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)} \cdot \sqrt[3]{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right) \cdot \log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}}\]
  12. Applied exp-prod34.1

    \[\leadsto \color{blue}{{\left(e^{\sqrt[3]{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\right)}^{\left(\sqrt[3]{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right) \cdot \log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\right)}}\]
  13. Final simplification34.1

    \[\leadsto {\left(e^{\sqrt[3]{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}}\right)}^{\left(\sqrt[3]{\log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right) \cdot \log \left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh c\right)\right)\right) \bmod \left(\mathsf{log1p}\left(a\right)\right)\right)}\right)}\]

Reproduce

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