Average Error: 0.3 → 0.5
Time: 46.9s
Precision: 64
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{\sqrt{1} + \tan x}{\frac{1 + \sqrt[3]{\left(\tan x \cdot \left(\tan x \cdot \tan x\right)\right) \cdot \left(\tan x \cdot \left(\tan x \cdot \tan x\right)\right)}}{\sqrt{1} - \tan x}}\]
\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}
\frac{\sqrt{1} + \tan x}{\frac{1 + \sqrt[3]{\left(\tan x \cdot \left(\tan x \cdot \tan x\right)\right) \cdot \left(\tan x \cdot \left(\tan x \cdot \tan x\right)\right)}}{\sqrt{1} - \tan x}}
double f(double x) {
        double r770458 = 1.0;
        double r770459 = x;
        double r770460 = tan(r770459);
        double r770461 = r770460 * r770460;
        double r770462 = r770458 - r770461;
        double r770463 = r770458 + r770461;
        double r770464 = r770462 / r770463;
        return r770464;
}

double f(double x) {
        double r770465 = 1.0;
        double r770466 = sqrt(r770465);
        double r770467 = x;
        double r770468 = tan(r770467);
        double r770469 = r770466 + r770468;
        double r770470 = r770468 * r770468;
        double r770471 = r770468 * r770470;
        double r770472 = r770471 * r770471;
        double r770473 = cbrt(r770472);
        double r770474 = r770465 + r770473;
        double r770475 = r770466 - r770468;
        double r770476 = r770474 / r770475;
        double r770477 = r770469 / r770476;
        return r770477;
}

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 clear-num0.4

    \[\leadsto \color{blue}{\frac{1}{\frac{1 + \tan x \cdot \tan x}{1 - \tan x \cdot \tan x}}}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.4

    \[\leadsto \frac{1}{\frac{1 + \tan x \cdot \tan x}{\color{blue}{\sqrt{1} \cdot \sqrt{1}} - \tan x \cdot \tan x}}\]
  6. Applied difference-of-squares0.4

    \[\leadsto \frac{1}{\frac{1 + \tan x \cdot \tan x}{\color{blue}{\left(\sqrt{1} + \tan x\right) \cdot \left(\sqrt{1} - \tan x\right)}}}\]
  7. Applied *-un-lft-identity0.4

    \[\leadsto \frac{1}{\frac{\color{blue}{1 \cdot \left(1 + \tan x \cdot \tan x\right)}}{\left(\sqrt{1} + \tan x\right) \cdot \left(\sqrt{1} - \tan x\right)}}\]
  8. Applied times-frac0.5

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

    \[\leadsto \color{blue}{\frac{\frac{1}{\frac{1}{\sqrt{1} + \tan x}}}{\frac{1 + \tan x \cdot \tan x}{\sqrt{1} - \tan x}}}\]
  10. Simplified0.4

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

    \[\leadsto \frac{\sqrt{1} + \tan x}{\frac{1 + \tan x \cdot \color{blue}{\sqrt[3]{\left(\tan x \cdot \tan x\right) \cdot \tan x}}}{\sqrt{1} - \tan x}}\]
  13. Applied add-cbrt-cube0.5

    \[\leadsto \frac{\sqrt{1} + \tan x}{\frac{1 + \color{blue}{\sqrt[3]{\left(\tan x \cdot \tan x\right) \cdot \tan x}} \cdot \sqrt[3]{\left(\tan x \cdot \tan x\right) \cdot \tan x}}{\sqrt{1} - \tan x}}\]
  14. Applied cbrt-unprod0.5

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

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

Reproduce

herbie shell --seed 2019168 
(FPCore (x)
  :name "Trigonometry B"
  (/ (- 1.0 (* (tan x) (tan x))) (+ 1.0 (* (tan x) (tan x)))))