Average Error: 0.3 → 0.4
Time: 1.2m
Precision: 64
Internal Precision: 576
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{(\left(\frac{\tan x}{\cos x}\right) \cdot \left(\sin x\right) + \left(-1\right))_*}{-(\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 frac-2neg0.4

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

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

Runtime

Time bar (total: 1.2m)Debug logProfile

herbie shell --seed '#(1072840222 1305617769 1692503039 1353360431 4178980589 1488672652)' +o rules:numerics
(FPCore (x)
  :name "Trigonometry B"
  (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))