Average Error: 27.1 → 0.7
Time: 13.8s
Precision: 64
\[\frac{\sin x - 32.0300000000000011368683772161602973938 \cdot pi}{\cos \left(x + 1\right)}\]
\[\frac{\sin x - 32.0300000000000011368683772161602973938 \cdot pi}{\cos x \cdot \cos 1 - \left(\sqrt{\sin 1} \cdot \sin x\right) \cdot \sqrt{\sin 1}}\]
\frac{\sin x - 32.0300000000000011368683772161602973938 \cdot pi}{\cos \left(x + 1\right)}
\frac{\sin x - 32.0300000000000011368683772161602973938 \cdot pi}{\cos x \cdot \cos 1 - \left(\sqrt{\sin 1} \cdot \sin x\right) \cdot \sqrt{\sin 1}}
double f(double x, double pi) {
        double r1385371 = x;
        double r1385372 = sin(r1385371);
        double r1385373 = 32.03;
        double r1385374 = pi;
        double r1385375 = r1385373 * r1385374;
        double r1385376 = r1385372 - r1385375;
        double r1385377 = 1.0;
        double r1385378 = r1385371 + r1385377;
        double r1385379 = cos(r1385378);
        double r1385380 = r1385376 / r1385379;
        return r1385380;
}

double f(double x, double pi) {
        double r1385381 = x;
        double r1385382 = sin(r1385381);
        double r1385383 = 32.03;
        double r1385384 = pi;
        double r1385385 = r1385383 * r1385384;
        double r1385386 = r1385382 - r1385385;
        double r1385387 = cos(r1385381);
        double r1385388 = 1.0;
        double r1385389 = cos(r1385388);
        double r1385390 = r1385387 * r1385389;
        double r1385391 = sin(r1385388);
        double r1385392 = sqrt(r1385391);
        double r1385393 = r1385392 * r1385382;
        double r1385394 = r1385393 * r1385392;
        double r1385395 = r1385390 - r1385394;
        double r1385396 = r1385386 / r1385395;
        return r1385396;
}

Error

Bits error versus x

Bits error versus pi

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 27.1

    \[\frac{\sin x - 32.0300000000000011368683772161602973938 \cdot pi}{\cos \left(x + 1\right)}\]
  2. Using strategy rm
  3. Applied cos-sum0.7

    \[\leadsto \frac{\sin x - 32.0300000000000011368683772161602973938 \cdot pi}{\color{blue}{\cos x \cdot \cos 1 - \sin x \cdot \sin 1}}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.7

    \[\leadsto \frac{\sin x - 32.0300000000000011368683772161602973938 \cdot pi}{\cos x \cdot \cos 1 - \sin x \cdot \color{blue}{\left(\sqrt{\sin 1} \cdot \sqrt{\sin 1}\right)}}\]
  6. Applied associate-*r*0.7

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

    \[\leadsto \frac{\sin x - 32.0300000000000011368683772161602973938 \cdot pi}{\cos x \cdot \cos 1 - \color{blue}{\left(\sqrt{\sin 1} \cdot \sin x\right)} \cdot \sqrt{\sin 1}}\]
  8. Final simplification0.7

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

Reproduce

herbie shell --seed 1 
(FPCore (x pi)
  :name "(sin(x)-32.03*pi)/cos(x + 1)"
  :precision binary64
  (/ (- (sin x) (* 32.030000000000001 pi)) (cos (+ x 1))))