Average Error: 27.4 → 8.2
Time: 30.0s
Precision: 64
Internal Precision: 576
\[\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}\]
\[\frac{\cos \left(2 \cdot x\right)}{x \cdot \left(\left(sin \cdot cos\right) \cdot \left(\left(cos \cdot x\right) \cdot sin\right)\right)}\]

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.4

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

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

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

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{\left(sin \cdot cos\right) \cdot \color{blue}{\left(\left(cos \cdot x\right) \cdot \left(sin \cdot x\right)\right)}}\]
  7. Using strategy rm
  8. Applied associate-*r*7.9

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{\left(sin \cdot cos\right) \cdot \color{blue}{\left(\left(\left(cos \cdot x\right) \cdot sin\right) \cdot x\right)}}\]
  9. Using strategy rm
  10. Applied associate-*r*8.2

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left(\left(sin \cdot cos\right) \cdot \left(\left(cos \cdot x\right) \cdot sin\right)\right) \cdot x}}\]
  11. Final simplification8.2

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

Runtime

Time bar (total: 30.0s)Debug logProfile

herbie shell --seed 2018221 
(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))))