Average Error: 0.3 → 0.4
Time: 28.8s
Precision: 64
Internal Precision: 576
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{1 - \frac{\tan x}{\cos x} \cdot \sin x}{(\left(\tan x\right) \cdot \left(\tan x\right) + 1)_*}\]

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 - \tan x \cdot \color{blue}{\frac{\sin x}{\cos x}}}{1 + \tan x \cdot \tan x}\]
  4. Applied associate-*r/0.4

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

    \[\leadsto \frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{\color{blue}{1 \cdot \left(1 + \tan x \cdot \tan x\right)}}\]
  7. Applied *-un-lft-identity0.4

    \[\leadsto \frac{\color{blue}{1 \cdot \left(1 - \frac{\tan x \cdot \sin x}{\cos x}\right)}}{1 \cdot \left(1 + \tan x \cdot \tan x\right)}\]
  8. Applied times-frac0.4

    \[\leadsto \color{blue}{\frac{1}{1} \cdot \frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{1 + \tan x \cdot \tan x}}\]
  9. Simplified0.4

    \[\leadsto \color{blue}{1} \cdot \frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{1 + \tan x \cdot \tan x}\]
  10. Simplified0.4

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

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

Runtime

Time bar (total: 28.8s)Debug logProfile

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