Average Error: 0.2 → 0
Time: 9.2s
Precision: 64
\[\frac{\sin x}{\tan x}\]
\[\cos x\]
\frac{\sin x}{\tan x}
\cos x
double f(double x) {
        double r2119239 = x;
        double r2119240 = sin(r2119239);
        double r2119241 = tan(r2119239);
        double r2119242 = r2119240 / r2119241;
        return r2119242;
}

double f(double x) {
        double r2119243 = x;
        double r2119244 = cos(r2119243);
        return r2119244;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\frac{\sin x}{\tan x}\]
  2. Using strategy rm
  3. Applied tan-quot0.1

    \[\leadsto \frac{\sin x}{\color{blue}{\frac{\sin x}{\cos x}}}\]
  4. Applied associate-/r/0

    \[\leadsto \color{blue}{\frac{\sin x}{\sin x} \cdot \cos x}\]
  5. Simplified0

    \[\leadsto \color{blue}{1} \cdot \cos x\]
  6. Final simplification0

    \[\leadsto \cos x\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "sin(x)/tan(x)"
  :precision binary64
  (/ (sin x) (tan x)))