Average Error: 0.3 → 0.4
Time: 59.7s
Precision: 64
Internal Precision: 128
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{1 - \frac{\tan x}{\frac{\cos x}{\sin x}}}{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 associate-/l*0.4

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

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

Reproduce

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