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

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 flip--0.5

    \[\leadsto \frac{\color{blue}{\frac{1 \cdot 1 - \frac{\tan x \cdot \sin x}{\cos x} \cdot \frac{\tan x \cdot \sin x}{\cos x}}{1 + \frac{\tan x \cdot \sin x}{\cos x}}}}{1 + \tan x \cdot \tan x}\]
  7. Applied simplify0.5

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

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

Runtime

Time bar (total: 1.4m)Debug logProfile

herbie shell --seed '#(1072330854 3074818769 591214268 3603999196 3863745332 3332387116)' +o rules:numerics
(FPCore (x)
  :name "Trigonometry B"
  (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))