Average Error: 0.1 → 0.1
Time: 5.1s
Precision: binary64
\[\cosh x \cdot \frac{\sin y}{y} \]
\[\cosh x \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\sin y}{y}\right)\right) \]
\cosh x \cdot \frac{\sin y}{y}
\cosh x \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\sin y}{y}\right)\right)
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
(FPCore (x y) :precision binary64 (* (cosh x) (log1p (expm1 (/ (sin y) y)))))
double code(double x, double y) {
	return cosh(x) * (sin(y) / y);
}
double code(double x, double y) {
	return cosh(x) * log1p(expm1(sin(y) / y));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.1
Herbie0.1
\[\frac{\cosh x \cdot \sin y}{y} \]

Derivation

  1. Initial program 0.1

    \[\cosh x \cdot \frac{\sin y}{y} \]
  2. Applied clear-num_binary640.2

    \[\leadsto \cosh x \cdot \color{blue}{\frac{1}{\frac{y}{\sin y}}} \]
  3. Applied log1p-expm1-u_binary640.2

    \[\leadsto \cosh x \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{\frac{y}{\sin y}}\right)\right)} \]
  4. Simplified0.1

    \[\leadsto \cosh x \cdot \mathsf{log1p}\left(\color{blue}{\mathsf{expm1}\left(\frac{\sin y}{y}\right)}\right) \]
  5. Final simplification0.1

    \[\leadsto \cosh x \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\sin y}{y}\right)\right) \]

Reproduce

herbie shell --seed 2022020 
(FPCore (x y)
  :name "Linear.Quaternion:$csinh from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (/ (* (cosh x) (sin y)) y)

  (* (cosh x) (/ (sin y) y)))