Average Error: 0.3 → 0.5
Time: 3.8s
Precision: 64
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{1}{1 + \sqrt[3]{{\left(\tan x\right)}^{6}}} - \frac{\tan x \cdot \tan x}{1 + \sqrt[3]{{\left(\tan x\right)}^{6}}}\]
\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}
\frac{1}{1 + \sqrt[3]{{\left(\tan x\right)}^{6}}} - \frac{\tan x \cdot \tan x}{1 + \sqrt[3]{{\left(\tan x\right)}^{6}}}
double code(double x) {
	return ((1.0 - (tan(x) * tan(x))) / (1.0 + (tan(x) * tan(x))));
}
double code(double x) {
	return ((1.0 / (1.0 + cbrt(pow(tan(x), 6.0)))) - ((tan(x) * tan(x)) / (1.0 + cbrt(pow(tan(x), 6.0)))));
}

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{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \color{blue}{\sqrt[3]{\left(\tan x \cdot \tan x\right) \cdot \tan x}}}\]
  4. Applied add-cbrt-cube0.4

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

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

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

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

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

Reproduce

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