Average Error: 25.8 → 0.6
Time: 15.5s
Precision: 64
\[\sin x + \cos \left(x + 1\right)\]
\[\frac{\left(\sin x \cdot \sin x\right) \cdot \sin x + \left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) \cdot \left(\left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) \cdot \left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right)\right)}{\left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) \cdot \left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) - \sin x \cdot \left(\left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) - \sin x\right)}\]
\sin x + \cos \left(x + 1\right)
\frac{\left(\sin x \cdot \sin x\right) \cdot \sin x + \left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) \cdot \left(\left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) \cdot \left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right)\right)}{\left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) \cdot \left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) - \sin x \cdot \left(\left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) - \sin x\right)}
double f(double x) {
        double r12535248 = x;
        double r12535249 = sin(r12535248);
        double r12535250 = 1.0;
        double r12535251 = r12535248 + r12535250;
        double r12535252 = cos(r12535251);
        double r12535253 = r12535249 + r12535252;
        return r12535253;
}

double f(double x) {
        double r12535254 = x;
        double r12535255 = sin(r12535254);
        double r12535256 = r12535255 * r12535255;
        double r12535257 = r12535256 * r12535255;
        double r12535258 = 1.0;
        double r12535259 = cos(r12535258);
        double r12535260 = cos(r12535254);
        double r12535261 = r12535259 * r12535260;
        double r12535262 = sin(r12535258);
        double r12535263 = r12535262 * r12535255;
        double r12535264 = r12535261 - r12535263;
        double r12535265 = r12535264 * r12535264;
        double r12535266 = r12535264 * r12535265;
        double r12535267 = r12535257 + r12535266;
        double r12535268 = r12535264 - r12535255;
        double r12535269 = r12535255 * r12535268;
        double r12535270 = r12535265 - r12535269;
        double r12535271 = r12535267 / r12535270;
        return r12535271;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 25.8

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

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

    \[\leadsto \color{blue}{\frac{{\left(\sin x\right)}^{3} + {\left(\cos x \cdot \cos 1 - \sin x \cdot \sin 1\right)}^{3}}{\sin x \cdot \sin x + \left(\left(\cos x \cdot \cos 1 - \sin x \cdot \sin 1\right) \cdot \left(\cos x \cdot \cos 1 - \sin x \cdot \sin 1\right) - \sin x \cdot \left(\cos x \cdot \cos 1 - \sin x \cdot \sin 1\right)\right)}}\]
  6. Simplified0.6

    \[\leadsto \frac{\color{blue}{\left(\sin x \cdot \sin x\right) \cdot \sin x + \left(\left(\cos x \cdot \cos 1 - \sin 1 \cdot \sin x\right) \cdot \left(\cos x \cdot \cos 1 - \sin 1 \cdot \sin x\right)\right) \cdot \left(\cos x \cdot \cos 1 - \sin 1 \cdot \sin x\right)}}{\sin x \cdot \sin x + \left(\left(\cos x \cdot \cos 1 - \sin x \cdot \sin 1\right) \cdot \left(\cos x \cdot \cos 1 - \sin x \cdot \sin 1\right) - \sin x \cdot \left(\cos x \cdot \cos 1 - \sin x \cdot \sin 1\right)\right)}\]
  7. Simplified0.6

    \[\leadsto \frac{\left(\sin x \cdot \sin x\right) \cdot \sin x + \left(\left(\cos x \cdot \cos 1 - \sin 1 \cdot \sin x\right) \cdot \left(\cos x \cdot \cos 1 - \sin 1 \cdot \sin x\right)\right) \cdot \left(\cos x \cdot \cos 1 - \sin 1 \cdot \sin x\right)}{\color{blue}{\left(\cos x \cdot \cos 1 - \sin 1 \cdot \sin x\right) \cdot \left(\cos x \cdot \cos 1 - \sin 1 \cdot \sin x\right) - \sin x \cdot \left(\left(\cos x \cdot \cos 1 - \sin 1 \cdot \sin x\right) - \sin x\right)}}\]
  8. Final simplification0.6

    \[\leadsto \frac{\left(\sin x \cdot \sin x\right) \cdot \sin x + \left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) \cdot \left(\left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) \cdot \left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right)\right)}{\left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) \cdot \left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) - \sin x \cdot \left(\left(\cos 1 \cdot \cos x - \sin 1 \cdot \sin x\right) - \sin x\right)}\]

Reproduce

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