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

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

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

Reproduce

herbie shell --seed 2020103 
(FPCore (a c)
  :name "Random Jason Timeout Test 004"
  :precision binary64
  (fmod (cosh c) (log1p a)))