Average Error: 0.3 → 0.4
Time: 32.6s
Precision: 64
Internal Precision: 128
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\frac{1 - \frac{1}{\frac{\cos x}{\sin x \cdot \tan x}}}{1 + \frac{\sin x \cdot \tan x}{\cos x}}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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 - \color{blue}{\frac{\sin x}{\cos x}} \cdot \tan x}{1 + \tan x \cdot \tan x}\]
  4. Applied associate-*l/0.4

    \[\leadsto \frac{1 - \color{blue}{\frac{\sin x \cdot \tan x}{\cos x}}}{1 + \tan x \cdot \tan x}\]
  5. Using strategy rm
  6. Applied tan-quot0.4

    \[\leadsto \frac{1 - \frac{\sin x \cdot \tan x}{\cos x}}{1 + \color{blue}{\frac{\sin x}{\cos x}} \cdot \tan x}\]
  7. Applied associate-*l/0.3

    \[\leadsto \frac{1 - \frac{\sin x \cdot \tan x}{\cos x}}{1 + \color{blue}{\frac{\sin x \cdot \tan x}{\cos x}}}\]
  8. Using strategy rm
  9. Applied clear-num0.4

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

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

Runtime

Time bar (total: 32.6s)Debug logProfile

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