Average Error: 7.6 → 0.2
Time: 10.6s
Precision: 64
\[3 \cdot pi + \sin \left(x + y\right)\]
\[\cos x \cdot \sin y + \left(3 \cdot pi + \sin x \cdot \cos y\right)\]
3 \cdot pi + \sin \left(x + y\right)
\cos x \cdot \sin y + \left(3 \cdot pi + \sin x \cdot \cos y\right)
double f(double pi, double x, double y) {
        double r2637723 = 3.0;
        double r2637724 = pi;
        double r2637725 = r2637723 * r2637724;
        double r2637726 = x;
        double r2637727 = y;
        double r2637728 = r2637726 + r2637727;
        double r2637729 = sin(r2637728);
        double r2637730 = r2637725 + r2637729;
        return r2637730;
}

double f(double pi, double x, double y) {
        double r2637731 = x;
        double r2637732 = cos(r2637731);
        double r2637733 = y;
        double r2637734 = sin(r2637733);
        double r2637735 = r2637732 * r2637734;
        double r2637736 = 3.0;
        double r2637737 = pi;
        double r2637738 = r2637736 * r2637737;
        double r2637739 = sin(r2637731);
        double r2637740 = cos(r2637733);
        double r2637741 = r2637739 * r2637740;
        double r2637742 = r2637738 + r2637741;
        double r2637743 = r2637735 + r2637742;
        return r2637743;
}

Error

Bits error versus pi

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 7.6

    \[3 \cdot pi + \sin \left(x + y\right)\]
  2. Using strategy rm
  3. Applied sin-sum0.2

    \[\leadsto 3 \cdot pi + \color{blue}{\left(\sin x \cdot \cos y + \cos x \cdot \sin y\right)}\]
  4. Applied associate-+r+0.2

    \[\leadsto \color{blue}{\left(3 \cdot pi + \sin x \cdot \cos y\right) + \cos x \cdot \sin y}\]
  5. Using strategy rm
  6. Applied +-commutative0.2

    \[\leadsto \color{blue}{\cos x \cdot \sin y + \left(3 \cdot pi + \sin x \cdot \cos y\right)}\]
  7. Final simplification0.2

    \[\leadsto \cos x \cdot \sin y + \left(3 \cdot pi + \sin x \cdot \cos y\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (pi x y)
  :name "3 * pi + sin(x + y)"
  :precision binary64
  (+ (* 3 pi) (sin (+ x y))))