Average Error: 0.3 → 0.5
Time: 59.8s
Precision: 64
Internal Precision: 128
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{\left(1 - \tan x \cdot \tan x\right) \cdot \left(1 - \tan x \cdot \tan x\right)}{\left(\left(1 - \tan x\right) \cdot \left(1 + \tan x\right)\right) \cdot \left(\tan x \cdot \tan x + 1\right)}\]

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 *-un-lft-identity0.3

    \[\leadsto \frac{\color{blue}{1 \cdot 1} - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
  4. Applied difference-of-squares0.3

    \[\leadsto \frac{\color{blue}{\left(1 + \tan x\right) \cdot \left(1 - \tan x\right)}}{1 + \tan x \cdot \tan x}\]
  5. Using strategy rm
  6. Applied flip--0.3

    \[\leadsto \frac{\left(1 + \tan x\right) \cdot \color{blue}{\frac{1 \cdot 1 - \tan x \cdot \tan x}{1 + \tan x}}}{1 + \tan x \cdot \tan x}\]
  7. Applied flip-+0.4

    \[\leadsto \frac{\color{blue}{\frac{1 \cdot 1 - \tan x \cdot \tan x}{1 - \tan x}} \cdot \frac{1 \cdot 1 - \tan x \cdot \tan x}{1 + \tan x}}{1 + \tan x \cdot \tan x}\]
  8. Applied frac-times0.4

    \[\leadsto \frac{\color{blue}{\frac{\left(1 \cdot 1 - \tan x \cdot \tan x\right) \cdot \left(1 \cdot 1 - \tan x \cdot \tan x\right)}{\left(1 - \tan x\right) \cdot \left(1 + \tan x\right)}}}{1 + \tan x \cdot \tan x}\]
  9. Applied associate-/l/0.5

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

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

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

Reproduce

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