Average Error: 0.3 → 0.4
Time: 20.0s
Precision: 64
Internal Precision: 128
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\left(1 - \tan x \cdot \tan x\right) \cdot \left(\frac{1}{{\left(\tan x \cdot \tan x\right)}^{3} + 1} \cdot (\left(\tan x \cdot \tan x\right) \cdot \left((\left(\tan x\right) \cdot \left(\tan x\right) + -1)_*\right) + 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 div-inv0.4

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

    \[\leadsto \left(1 - \tan x \cdot \tan x\right) \cdot \frac{1}{\color{blue}{\frac{{1}^{3} + {\left(\tan x \cdot \tan x\right)}^{3}}{1 \cdot 1 + \left(\left(\tan x \cdot \tan x\right) \cdot \left(\tan x \cdot \tan x\right) - 1 \cdot \left(\tan x \cdot \tan x\right)\right)}}}\]
  6. Applied associate-/r/0.4

    \[\leadsto \left(1 - \tan x \cdot \tan x\right) \cdot \color{blue}{\left(\frac{1}{{1}^{3} + {\left(\tan x \cdot \tan x\right)}^{3}} \cdot \left(1 \cdot 1 + \left(\left(\tan x \cdot \tan x\right) \cdot \left(\tan x \cdot \tan x\right) - 1 \cdot \left(\tan x \cdot \tan x\right)\right)\right)\right)}\]
  7. Simplified0.4

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

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

Reproduce

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