Average Error: 0.3 → 0.4
Time: 3.9s
Precision: 64
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{1 - \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 - \tan x \cdot \tan x}{1 + \sqrt[3]{{\left(\tan x\right)}^{6}}}
double code(double x) {
	return ((double) (((double) (1.0 - ((double) (((double) tan(x)) * ((double) tan(x)))))) / ((double) (1.0 + ((double) (((double) tan(x)) * ((double) tan(x))))))));
}
double code(double x) {
	return ((double) (((double) (1.0 - ((double) (((double) tan(x)) * ((double) tan(x)))))) / ((double) (1.0 + ((double) cbrt(((double) pow(((double) 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. Final simplification0.4

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

Reproduce

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