Average Error: 0.6 → 0.6
Time: 35.0s
Precision: 64
Internal Precision: 2368
\[\frac{3 \cdot \tan x - {\left(\tan x\right)}^{3}}{1 - 3 \cdot {\left(\tan x\right)}^{2}}\]
\[\frac{\frac{3 - \tan x \cdot \tan x}{\tan x \cdot \left(3 \cdot \sin x\right) + \cos x}}{\cos x - \tan x \cdot \left(3 \cdot \sin x\right)} \cdot \left(\left(\tan x \cdot \cos x\right) \cdot \left(\tan x \cdot \left(3 \cdot \sin x\right) + \cos x\right)\right)\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.6

    \[\frac{3 \cdot \tan x - {\left(\tan x\right)}^{3}}{1 - 3 \cdot {\left(\tan x\right)}^{2}}\]
  2. Initial simplification0.7

    \[\leadsto \frac{3 - \tan x \cdot \tan x}{\frac{1}{\tan x} - 3 \cdot \tan x}\]
  3. Using strategy rm
  4. Applied tan-quot0.7

    \[\leadsto \frac{3 - \tan x \cdot \tan x}{\frac{1}{\tan x} - 3 \cdot \color{blue}{\frac{\sin x}{\cos x}}}\]
  5. Applied associate-*r/0.7

    \[\leadsto \frac{3 - \tan x \cdot \tan x}{\frac{1}{\tan x} - \color{blue}{\frac{3 \cdot \sin x}{\cos x}}}\]
  6. Applied frac-sub0.7

    \[\leadsto \frac{3 - \tan x \cdot \tan x}{\color{blue}{\frac{1 \cdot \cos x - \tan x \cdot \left(3 \cdot \sin x\right)}{\tan x \cdot \cos x}}}\]
  7. Applied associate-/r/0.6

    \[\leadsto \color{blue}{\frac{3 - \tan x \cdot \tan x}{1 \cdot \cos x - \tan x \cdot \left(3 \cdot \sin x\right)} \cdot \left(\tan x \cdot \cos x\right)}\]
  8. Using strategy rm
  9. Applied flip--0.6

    \[\leadsto \frac{3 - \tan x \cdot \tan x}{\color{blue}{\frac{\left(1 \cdot \cos x\right) \cdot \left(1 \cdot \cos x\right) - \left(\tan x \cdot \left(3 \cdot \sin x\right)\right) \cdot \left(\tan x \cdot \left(3 \cdot \sin x\right)\right)}{1 \cdot \cos x + \tan x \cdot \left(3 \cdot \sin x\right)}}} \cdot \left(\tan x \cdot \cos x\right)\]
  10. Applied associate-/r/0.6

    \[\leadsto \color{blue}{\left(\frac{3 - \tan x \cdot \tan x}{\left(1 \cdot \cos x\right) \cdot \left(1 \cdot \cos x\right) - \left(\tan x \cdot \left(3 \cdot \sin x\right)\right) \cdot \left(\tan x \cdot \left(3 \cdot \sin x\right)\right)} \cdot \left(1 \cdot \cos x + \tan x \cdot \left(3 \cdot \sin x\right)\right)\right)} \cdot \left(\tan x \cdot \cos x\right)\]
  11. Applied associate-*l*0.7

    \[\leadsto \color{blue}{\frac{3 - \tan x \cdot \tan x}{\left(1 \cdot \cos x\right) \cdot \left(1 \cdot \cos x\right) - \left(\tan x \cdot \left(3 \cdot \sin x\right)\right) \cdot \left(\tan x \cdot \left(3 \cdot \sin x\right)\right)} \cdot \left(\left(1 \cdot \cos x + \tan x \cdot \left(3 \cdot \sin x\right)\right) \cdot \left(\tan x \cdot \cos x\right)\right)}\]
  12. Simplified0.6

    \[\leadsto \color{blue}{\frac{\frac{3 - \tan x \cdot \tan x}{\cos x + \left(\sin x \cdot 3\right) \cdot \tan x}}{\cos x - \left(\sin x \cdot 3\right) \cdot \tan x}} \cdot \left(\left(1 \cdot \cos x + \tan x \cdot \left(3 \cdot \sin x\right)\right) \cdot \left(\tan x \cdot \cos x\right)\right)\]
  13. Final simplification0.6

    \[\leadsto \frac{\frac{3 - \tan x \cdot \tan x}{\tan x \cdot \left(3 \cdot \sin x\right) + \cos x}}{\cos x - \tan x \cdot \left(3 \cdot \sin x\right)} \cdot \left(\left(\tan x \cdot \cos x\right) \cdot \left(\tan x \cdot \left(3 \cdot \sin x\right) + \cos x\right)\right)\]

Runtime

Time bar (total: 35.0s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (x)
  :name "(3*tan(x) - tan(x)^3) / (1- 3*tan(x)^2)"
  (/ (- (* 3 (tan x)) (pow (tan x) 3)) (- 1 (* 3 (pow (tan x) 2)))))