Average Error: 0.3 → 0.4
Time: 25.5s
Precision: 64
Internal Precision: 384
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{1 + \frac{\sin x \cdot \sin x}{\cos x \cdot \cos 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 tan-quot0.4

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

    \[\leadsto \frac{1 - \frac{\tan x \cdot \sin x}{\cos x}}{1 + \color{blue}{\frac{\sin x}{\cos x}} \cdot \frac{\sin x}{\cos x}}\]
  8. Applied frac-times0.4

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

Runtime

Time bar (total: 25.5s)Debug logProfile

herbie shell --seed '#(1064397287 3527694221 3797617954 1138343853 2854031332 1153838279)' 
(FPCore (x)
  :name "Trigonometry B"
  (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))