Average Error: 0.3 → 0.4
Time: 1.1m
Precision: 64
Internal Precision: 128
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{\frac{1 - {\left(\frac{\sin x \cdot \tan x}{\cos x}\right)}^{3}}{\left(\frac{\sin x \cdot \tan x}{\cos x} \cdot \frac{\sin x \cdot \tan x}{\cos x} + \frac{\sin x \cdot \tan x}{\cos x}\right) + 1}}{1 + \frac{\sin x \cdot \tan x}{\cos x}}\]

Error

Bits error versus x

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 tan-quot0.4

    \[\leadsto \frac{1 - \color{blue}{\frac{\sin x}{\cos x}} \cdot \tan x}{1 + \tan x \cdot \tan x}\]
  4. Applied associate-*l/0.4

    \[\leadsto \frac{1 - \color{blue}{\frac{\sin x \cdot \tan x}{\cos x}}}{1 + \tan x \cdot \tan x}\]
  5. Using strategy rm
  6. Applied tan-quot0.4

    \[\leadsto \frac{1 - \frac{\sin x \cdot \tan x}{\cos x}}{1 + \color{blue}{\frac{\sin x}{\cos x}} \cdot \tan x}\]
  7. Applied associate-*l/0.3

    \[\leadsto \frac{1 - \frac{\sin x \cdot \tan x}{\cos x}}{1 + \color{blue}{\frac{\sin x \cdot \tan x}{\cos x}}}\]
  8. Using strategy rm
  9. Applied flip3--0.4

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

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

Reproduce

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