Average Error: 0.3 → 0.5
Time: 5.5s
Precision: 64
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{\sqrt[3]{{\left(1 - \frac{\tan x \cdot \sin x}{\cos x}\right)}^{3}}}{1 + \tan x \cdot \tan x}\]
\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}
\frac{\sqrt[3]{{\left(1 - \frac{\tan x \cdot \sin x}{\cos x}\right)}^{3}}}{1 + \tan x \cdot \tan x}
double f(double x) {
        double r13223 = 1.0;
        double r13224 = x;
        double r13225 = tan(r13224);
        double r13226 = r13225 * r13225;
        double r13227 = r13223 - r13226;
        double r13228 = r13223 + r13226;
        double r13229 = r13227 / r13228;
        return r13229;
}

double f(double x) {
        double r13230 = 1.0;
        double r13231 = x;
        double r13232 = tan(r13231);
        double r13233 = sin(r13231);
        double r13234 = r13232 * r13233;
        double r13235 = cos(r13231);
        double r13236 = r13234 / r13235;
        double r13237 = r13230 - r13236;
        double r13238 = 3.0;
        double r13239 = pow(r13237, r13238);
        double r13240 = cbrt(r13239);
        double r13241 = r13232 * r13232;
        double r13242 = r13230 + r13241;
        double r13243 = r13240 / r13242;
        return r13243;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

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

    \[\leadsto \frac{1 - \tan x \cdot \color{blue}{\frac{\sin x}{\cos x}}}{1 + \tan x \cdot \tan x}\]
  4. Applied associate-*r/0.4

    \[\leadsto \frac{1 - \color{blue}{\frac{\tan x \cdot \sin x}{\cos x}}}{1 + \tan x \cdot \tan x}\]
  5. Using strategy rm
  6. Applied add-cbrt-cube0.5

    \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\left(1 - \frac{\tan x \cdot \sin x}{\cos x}\right) \cdot \left(1 - \frac{\tan x \cdot \sin x}{\cos x}\right)\right) \cdot \left(1 - \frac{\tan x \cdot \sin x}{\cos x}\right)}}}{1 + \tan x \cdot \tan x}\]
  7. Simplified0.5

    \[\leadsto \frac{\sqrt[3]{\color{blue}{{\left(1 - \frac{\tan x \cdot \sin x}{\cos x}\right)}^{3}}}}{1 + \tan x \cdot \tan x}\]
  8. Final simplification0.5

    \[\leadsto \frac{\sqrt[3]{{\left(1 - \frac{\tan x \cdot \sin x}{\cos x}\right)}^{3}}}{1 + \tan x \cdot \tan x}\]

Reproduce

herbie shell --seed 2020049 
(FPCore (x)
  :name "Trigonometry B"
  :precision binary64
  (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))