Average Error: 22.4 → 3.8
Time: 9.4s
Precision: 64
\[{\left(\cos x\right)}^{y}\]
\[1\]
{\left(\cos x\right)}^{y}
1
double f(double x, double y) {
        double r1443106 = x;
        double r1443107 = cos(r1443106);
        double r1443108 = y;
        double r1443109 = pow(r1443107, r1443108);
        return r1443109;
}

double f(double __attribute__((unused)) x, double __attribute__((unused)) y) {
        double r1443110 = 1.0;
        return r1443110;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 22.4

    \[{\left(\cos x\right)}^{y}\]
  2. Taylor expanded around 0 3.8

    \[\leadsto \color{blue}{1}\]
  3. Final simplification3.8

    \[\leadsto 1\]

Reproduce

herbie shell --seed 1 
(FPCore (x y)
  :name "pow(cos(x),y)"
  :precision binary64
  (pow (cos x) y))