Average Error: 0.3 → 0.4
Time: 4.6s
Precision: 64
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{1 - \sqrt[3]{{\left(\tan x\right)}^{6}}}{1 + \sqrt[3]{{\left(\tan x\right)}^{6}}}\]
\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}
\frac{1 - \sqrt[3]{{\left(\tan x\right)}^{6}}}{1 + \sqrt[3]{{\left(\tan x\right)}^{6}}}
double f(double x) {
        double r11788 = 1.0;
        double r11789 = x;
        double r11790 = tan(r11789);
        double r11791 = r11790 * r11790;
        double r11792 = r11788 - r11791;
        double r11793 = r11788 + r11791;
        double r11794 = r11792 / r11793;
        return r11794;
}

double f(double x) {
        double r11795 = 1.0;
        double r11796 = x;
        double r11797 = tan(r11796);
        double r11798 = 6.0;
        double r11799 = pow(r11797, r11798);
        double r11800 = cbrt(r11799);
        double r11801 = r11795 - r11800;
        double r11802 = r11795 + r11800;
        double r11803 = r11801 / r11802;
        return r11803;
}

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.5

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

    \[\leadsto \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}}{1 + \tan x \cdot \tan x}\]
  5. Applied cbrt-unprod0.5

    \[\leadsto \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)}}}{1 + \tan x \cdot \tan x}\]
  6. Simplified0.5

    \[\leadsto \frac{1 - \sqrt[3]{\color{blue}{{\left(\tan x\right)}^{6}}}}{1 + \tan x \cdot \tan x}\]
  7. Using strategy rm
  8. Applied add-cbrt-cube0.5

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

    \[\leadsto \frac{1 - \sqrt[3]{{\left(\tan x\right)}^{6}}}{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}}\]
  10. Applied cbrt-unprod0.4

    \[\leadsto \frac{1 - \sqrt[3]{{\left(\tan x\right)}^{6}}}{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)}}}\]
  11. Simplified0.4

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

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

Reproduce

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