Average Error: 1.0 → 0.0
Time: 54.0s
Precision: 64
\[\cosh \left(x + 1\right) - \cosh x\]
\[2 \cdot \left(\sinh \left(\frac{1}{2}\right) \cdot \sinh \left(\frac{x + \left(x + 1\right)}{2}\right)\right)\]
\cosh \left(x + 1\right) - \cosh x
2 \cdot \left(\sinh \left(\frac{1}{2}\right) \cdot \sinh \left(\frac{x + \left(x + 1\right)}{2}\right)\right)
double f(double x) {
        double r23992617 = x;
        double r23992618 = 1.0;
        double r23992619 = r23992617 + r23992618;
        double r23992620 = cosh(r23992619);
        double r23992621 = cosh(r23992617);
        double r23992622 = r23992620 - r23992621;
        return r23992622;
}

double f(double x) {
        double r23992623 = 2.0;
        double r23992624 = 1.0;
        double r23992625 = r23992624 / r23992623;
        double r23992626 = sinh(r23992625);
        double r23992627 = x;
        double r23992628 = r23992627 + r23992624;
        double r23992629 = r23992627 + r23992628;
        double r23992630 = r23992629 / r23992623;
        double r23992631 = sinh(r23992630);
        double r23992632 = r23992626 * r23992631;
        double r23992633 = r23992623 * r23992632;
        return r23992633;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 1.0

    \[\cosh \left(x + 1\right) - \cosh x\]
  2. Using strategy rm
  3. Applied diff-cosh0.0

    \[\leadsto \color{blue}{2 \cdot \left(\sinh \left(\frac{\left(x + 1\right) + x}{2}\right) \cdot \sinh \left(\frac{\left(x + 1\right) - x}{2}\right)\right)}\]
  4. Simplified0.0

    \[\leadsto 2 \cdot \color{blue}{\left(\sinh \left(\frac{x + \left(1 + x\right)}{2}\right) \cdot \sinh \left(\frac{1}{2}\right)\right)}\]
  5. Final simplification0.0

    \[\leadsto 2 \cdot \left(\sinh \left(\frac{1}{2}\right) \cdot \sinh \left(\frac{x + \left(x + 1\right)}{2}\right)\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "cosh(x+1)-cosh(x)"
  (- (cosh (+ x 1.0)) (cosh x)))