Average Error: 11.1 → 3.4
Time: 18.2s
Precision: 64
\[\left(\frac{1}{{pR}^{2}} \cdot \left(\cos \left(p0 - pR \cdot t\right) - \cos p0\right)\right) \cdot a\]
\[0 \cdot a\]
\left(\frac{1}{{pR}^{2}} \cdot \left(\cos \left(p0 - pR \cdot t\right) - \cos p0\right)\right) \cdot a
0 \cdot a
double f(double pR, double p0, double t, double a) {
        double r534803 = 1.0;
        double r534804 = pR;
        double r534805 = 2.0;
        double r534806 = pow(r534804, r534805);
        double r534807 = r534803 / r534806;
        double r534808 = p0;
        double r534809 = t;
        double r534810 = r534804 * r534809;
        double r534811 = r534808 - r534810;
        double r534812 = cos(r534811);
        double r534813 = cos(r534808);
        double r534814 = r534812 - r534813;
        double r534815 = r534807 * r534814;
        double r534816 = a;
        double r534817 = r534815 * r534816;
        return r534817;
}

double f(double __attribute__((unused)) pR, double __attribute__((unused)) p0, double __attribute__((unused)) t, double a) {
        double r534818 = 0.0;
        double r534819 = a;
        double r534820 = r534818 * r534819;
        return r534820;
}

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 11.1

    \[\left(\frac{1}{{pR}^{2}} \cdot \left(\cos \left(p0 - pR \cdot t\right) - \cos p0\right)\right) \cdot a\]
  2. Taylor expanded around 0 3.4

    \[\leadsto \color{blue}{0} \cdot a\]
  3. Final simplification3.4

    \[\leadsto 0 \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
  (* (* (/ 1 (pow pR 2)) (- (cos (- p0 (* pR t))) (cos p0))) a))