Average Error: 25.0 → 0.6
Time: 12.5s
Precision: 64
\[\sin \left(x + 1\right) + 1\]
\[1 + \left(\log \left(e^{\cos 1 \cdot \sin x}\right) + \cos x \cdot \sin 1\right)\]
\sin \left(x + 1\right) + 1
1 + \left(\log \left(e^{\cos 1 \cdot \sin x}\right) + \cos x \cdot \sin 1\right)
double f(double x) {
        double r1326672 = x;
        double r1326673 = 1.0;
        double r1326674 = r1326672 + r1326673;
        double r1326675 = sin(r1326674);
        double r1326676 = r1326675 + r1326673;
        return r1326676;
}

double f(double x) {
        double r1326677 = 1.0;
        double r1326678 = cos(r1326677);
        double r1326679 = x;
        double r1326680 = sin(r1326679);
        double r1326681 = r1326678 * r1326680;
        double r1326682 = exp(r1326681);
        double r1326683 = log(r1326682);
        double r1326684 = cos(r1326679);
        double r1326685 = sin(r1326677);
        double r1326686 = r1326684 * r1326685;
        double r1326687 = r1326683 + r1326686;
        double r1326688 = r1326677 + r1326687;
        return r1326688;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 25.0

    \[\sin \left(x + 1\right) + 1\]
  2. Using strategy rm
  3. Applied sin-sum0.5

    \[\leadsto \color{blue}{\left(\sin x \cdot \cos 1 + \cos x \cdot \sin 1\right)} + 1\]
  4. Using strategy rm
  5. Applied add-log-exp0.6

    \[\leadsto \left(\color{blue}{\log \left(e^{\sin x \cdot \cos 1}\right)} + \cos x \cdot \sin 1\right) + 1\]
  6. Final simplification0.6

    \[\leadsto 1 + \left(\log \left(e^{\cos 1 \cdot \sin x}\right) + \cos x \cdot \sin 1\right)\]

Reproduce

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