Average Error: 11.2 → 3.4
Time: 16.6s
Precision: 64
\[\frac{a_l}{{psi_R}^{2}} \cdot \left(\cos \left(psi_0 + psi_R \cdot t\right) - \cos psi_0\right)\]
\[0\]
\frac{a_l}{{psi_R}^{2}} \cdot \left(\cos \left(psi_0 + psi_R \cdot t\right) - \cos psi_0\right)
0
double f(double a_l, double psi_R, double psi_0, double t) {
        double r1476788 = a_l;
        double r1476789 = psi_R;
        double r1476790 = 2.0;
        double r1476791 = pow(r1476789, r1476790);
        double r1476792 = r1476788 / r1476791;
        double r1476793 = psi_0;
        double r1476794 = t;
        double r1476795 = r1476789 * r1476794;
        double r1476796 = r1476793 + r1476795;
        double r1476797 = cos(r1476796);
        double r1476798 = cos(r1476793);
        double r1476799 = r1476797 - r1476798;
        double r1476800 = r1476792 * r1476799;
        return r1476800;
}

double f(double __attribute__((unused)) a_l, double __attribute__((unused)) psi_R, double __attribute__((unused)) psi_0, double __attribute__((unused)) t) {
        double r1476801 = 0.0;
        return r1476801;
}

Error

Bits error versus a_l

Bits error versus psi_R

Bits error versus psi_0

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 11.2

    \[\frac{a_l}{{psi_R}^{2}} \cdot \left(\cos \left(psi_0 + psi_R \cdot t\right) - \cos psi_0\right)\]
  2. Taylor expanded around 0 3.4

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

    \[\leadsto 0\]

Reproduce

herbie shell --seed 1 
(FPCore (a_l psi_R psi_0 t)
  :name "a_l / psi_R^2 * (cos(psi_0+psi_R*t) - cos(psi_0))"
  :precision binary32
  (* (/ a_l (pow psi_R 2)) (- (cos (+ psi_0 (* psi_R t))) (cos psi_0))))