Average Error: 0.3 → 0.4
Time: 42.2s
Precision: 64
Internal Precision: 128
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{1}{\frac{(\left(\tan x\right) \cdot \left(\tan 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 *-un-lft-identity0.3

    \[\leadsto \frac{1 - \tan x \cdot \tan x}{\color{blue}{1 \cdot \left(1 + \tan x \cdot \tan x\right)}}\]
  4. Applied associate-/r*0.3

    \[\leadsto \color{blue}{\frac{\frac{1 - \tan x \cdot \tan x}{1}}{1 + \tan x \cdot \tan x}}\]
  5. Simplified0.3

    \[\leadsto \frac{\frac{1 - \tan x \cdot \tan x}{1}}{\color{blue}{(\left(\tan x\right) \cdot \left(\tan x\right) + 1)_*}}\]
  6. Using strategy rm
  7. Applied *-un-lft-identity0.3

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

    \[\leadsto \color{blue}{\frac{1}{\frac{(\left(\tan x\right) \cdot \left(\tan x\right) + 1)_*}{\frac{1 - \tan x \cdot \tan x}{1}}}}\]
  9. Final simplification0.4

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

Runtime

Time bar (total: 42.2s)Debug logProfile

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