Average Error: 27.3 → 2.5
Time: 33.4s
Precision: 64
Internal Precision: 320
\[\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}\]
\[\frac{\frac{\cos x \cdot \cos x}{\left(cos \cdot x\right) \cdot sin} - \frac{\sin x \cdot \sin x}{\left(cos \cdot x\right) \cdot sin}}{\left(cos \cdot x\right) \cdot sin}\]

Error

Bits error versus x

Bits error versus cos

Bits error versus sin

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 27.3

    \[\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}\]
  2. Initial simplification2.8

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{\left(\left(x \cdot cos\right) \cdot sin\right) \cdot \left(\left(x \cdot cos\right) \cdot sin\right)}\]
  3. Using strategy rm
  4. Applied associate-/r*2.5

    \[\leadsto \color{blue}{\frac{\frac{\cos \left(2 \cdot x\right)}{\left(x \cdot cos\right) \cdot sin}}{\left(x \cdot cos\right) \cdot sin}}\]
  5. Using strategy rm
  6. Applied cos-22.5

    \[\leadsto \frac{\frac{\color{blue}{\cos x \cdot \cos x - \sin x \cdot \sin x}}{\left(x \cdot cos\right) \cdot sin}}{\left(x \cdot cos\right) \cdot sin}\]
  7. Applied div-sub2.5

    \[\leadsto \frac{\color{blue}{\frac{\cos x \cdot \cos x}{\left(x \cdot cos\right) \cdot sin} - \frac{\sin x \cdot \sin x}{\left(x \cdot cos\right) \cdot sin}}}{\left(x \cdot cos\right) \cdot sin}\]
  8. Final simplification2.5

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

Runtime

Time bar (total: 33.4s)Debug logProfile

herbie shell --seed 2018225 
(FPCore (x cos sin)
  :name "cos(2*x)/(cos^2(x)*sin^2(x))"
  (/ (cos (* 2 x)) (* (pow cos 2) (* (* x (pow sin 2)) x))))