Average Error: 0.3 → 0.5
Time: 1.5m
Precision: 64
Internal Precision: 576
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{\frac{{1}^{3} - {\left(\frac{\tan x \cdot \sin x}{\cos x}\right)}^{3}}{(\left(\frac{\tan x \cdot \sin x}{\cos x}\right) \cdot \left((\left(\frac{\tan x}{\cos x}\right) \cdot \left(\sin x\right) + 1)_*\right) + 1)_*}}{(\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. Applied simplify0.3

    \[\leadsto \color{blue}{\frac{1 - \tan x \cdot \tan x}{(\left(\tan x\right) \cdot \left(\tan x\right) + 1)_*}}\]
  3. Using strategy rm
  4. Applied tan-quot0.4

    \[\leadsto \frac{1 - \tan x \cdot \color{blue}{\frac{\sin x}{\cos x}}}{(\left(\tan x\right) \cdot \left(\tan x\right) + 1)_*}\]
  5. Applied associate-*r/0.4

    \[\leadsto \frac{1 - \color{blue}{\frac{\tan x \cdot \sin x}{\cos x}}}{(\left(\tan x\right) \cdot \left(\tan x\right) + 1)_*}\]
  6. Using strategy rm
  7. Applied flip3--0.4

    \[\leadsto \frac{\color{blue}{\frac{{1}^{3} - {\left(\frac{\tan x \cdot \sin x}{\cos x}\right)}^{3}}{1 \cdot 1 + \left(\frac{\tan x \cdot \sin x}{\cos x} \cdot \frac{\tan x \cdot \sin x}{\cos x} + 1 \cdot \frac{\tan x \cdot \sin x}{\cos x}\right)}}}{(\left(\tan x\right) \cdot \left(\tan x\right) + 1)_*}\]
  8. Applied simplify0.5

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

Runtime

Time bar (total: 1.5m)Debug logProfile

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