Average Error: 0.3 → 0.4
Time: 16.8s
Precision: 64
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{\sqrt[3]{{\left(1 - \tan x \cdot \tan 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 - \tan x \cdot \tan x\right)}^{3}}}{1 + \tan x \cdot \tan x}
double f(double x) {
        double r20016 = 1.0;
        double r20017 = x;
        double r20018 = tan(r20017);
        double r20019 = r20018 * r20018;
        double r20020 = r20016 - r20019;
        double r20021 = r20016 + r20019;
        double r20022 = r20020 / r20021;
        return r20022;
}

double f(double x) {
        double r20023 = 1.0;
        double r20024 = x;
        double r20025 = tan(r20024);
        double r20026 = r20025 * r20025;
        double r20027 = r20023 - r20026;
        double r20028 = 3.0;
        double r20029 = pow(r20027, r20028);
        double r20030 = cbrt(r20029);
        double r20031 = r20023 + r20026;
        double r20032 = r20030 / r20031;
        return r20032;
}

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 add-cbrt-cube0.4

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

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

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

Reproduce

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