Average Error: 0.5 → 0.5
Time: 12.7s
Precision: 64
\[\tan a + \sin a\]
\[\frac{\sin a}{\cos a} + \sin a\]
\tan a + \sin a
\frac{\sin a}{\cos a} + \sin a
double f(double a) {
        double r35020 = a;
        double r35021 = tan(r35020);
        double r35022 = sin(r35020);
        double r35023 = r35021 + r35022;
        return r35023;
}

double f(double a) {
        double r35024 = a;
        double r35025 = sin(r35024);
        double r35026 = cos(r35024);
        double r35027 = r35025 / r35026;
        double r35028 = r35027 + r35025;
        return r35028;
}

Error

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.5

    \[\tan a + \sin a\]
  2. Taylor expanded around inf 0.5

    \[\leadsto \color{blue}{\frac{\sin a}{\cos a} + \sin a}\]
  3. Final simplification0.5

    \[\leadsto \frac{\sin a}{\cos a} + \sin a\]

Reproduce

herbie shell --seed 1 
(FPCore (a)
  :name "tan(a) + sin(a)"
  :precision binary64
  (+ (tan a) (sin a)))