Average Error: 4.4 → 2.4
Time: 19.5s
Precision: 64
\[9.999999960041972002500187954865396022797 \cdot 10^{-12} \le \left|pR\right| \le 10^{10}\]
\[\left(\frac{1}{{pR}^{2}} \cdot \left(\cos \left(p0 + pR \cdot t\right) - \cos p0\right)\right) \cdot a\]
\[\left(\frac{1}{{pR}^{2}} \cdot \left(-2 \cdot \left(\sin \left(\frac{\left(p0 + pR \cdot t\right) + p0}{2}\right) \cdot \sin \left(\frac{pR \cdot t}{2}\right)\right)\right)\right) \cdot a\]
\left(\frac{1}{{pR}^{2}} \cdot \left(\cos \left(p0 + pR \cdot t\right) - \cos p0\right)\right) \cdot a
\left(\frac{1}{{pR}^{2}} \cdot \left(-2 \cdot \left(\sin \left(\frac{\left(p0 + pR \cdot t\right) + p0}{2}\right) \cdot \sin \left(\frac{pR \cdot t}{2}\right)\right)\right)\right) \cdot a
double f(double pR, double p0, double t, double a) {
        double r3175431 = 1.0;
        double r3175432 = pR;
        double r3175433 = 2.0;
        double r3175434 = pow(r3175432, r3175433);
        double r3175435 = r3175431 / r3175434;
        double r3175436 = p0;
        double r3175437 = t;
        double r3175438 = r3175432 * r3175437;
        double r3175439 = r3175436 + r3175438;
        double r3175440 = cos(r3175439);
        double r3175441 = cos(r3175436);
        double r3175442 = r3175440 - r3175441;
        double r3175443 = r3175435 * r3175442;
        double r3175444 = a;
        double r3175445 = r3175443 * r3175444;
        return r3175445;
}

double f(double pR, double p0, double t, double a) {
        double r3175446 = 1.0;
        double r3175447 = pR;
        double r3175448 = 2.0;
        double r3175449 = pow(r3175447, r3175448);
        double r3175450 = r3175446 / r3175449;
        double r3175451 = -2.0;
        double r3175452 = p0;
        double r3175453 = t;
        double r3175454 = r3175447 * r3175453;
        double r3175455 = r3175452 + r3175454;
        double r3175456 = r3175455 + r3175452;
        double r3175457 = 2.0;
        double r3175458 = r3175456 / r3175457;
        double r3175459 = sin(r3175458);
        double r3175460 = r3175454 / r3175457;
        double r3175461 = sin(r3175460);
        double r3175462 = r3175459 * r3175461;
        double r3175463 = r3175451 * r3175462;
        double r3175464 = r3175450 * r3175463;
        double r3175465 = a;
        double r3175466 = r3175464 * r3175465;
        return r3175466;
}

Error

Bits error versus pR

Bits error versus p0

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 4.4

    \[\left(\frac{1}{{pR}^{2}} \cdot \left(\cos \left(p0 + pR \cdot t\right) - \cos p0\right)\right) \cdot a\]
  2. Using strategy rm
  3. Applied diff-cos3.9

    \[\leadsto \left(\frac{1}{{pR}^{2}} \cdot \color{blue}{\left(-2 \cdot \left(\sin \left(\frac{\left(p0 + pR \cdot t\right) - p0}{2}\right) \cdot \sin \left(\frac{\left(p0 + pR \cdot t\right) + p0}{2}\right)\right)\right)}\right) \cdot a\]
  4. Simplified2.4

    \[\leadsto \left(\frac{1}{{pR}^{2}} \cdot \left(-2 \cdot \color{blue}{\left(\sin \left(\frac{\left(p0 + pR \cdot t\right) + p0}{2}\right) \cdot \sin \left(\frac{pR \cdot t}{2}\right)\right)}\right)\right) \cdot a\]
  5. Final simplification2.4

    \[\leadsto \left(\frac{1}{{pR}^{2}} \cdot \left(-2 \cdot \left(\sin \left(\frac{\left(p0 + pR \cdot t\right) + p0}{2}\right) \cdot \sin \left(\frac{pR \cdot t}{2}\right)\right)\right)\right) \cdot a\]

Reproduce

herbie shell --seed 1 
(FPCore (pR p0 t a)
  :name "1/pR^2*(cos(p0 + pR*t) - cos(p0))*a"
  :precision binary32
  :pre (<= 9.99999996e-12 (fabs pR) 1e10)
  (* (* (/ 1 (pow pR 2)) (- (cos (+ p0 (* pR t))) (cos p0))) a))