Average Error: 28.0 → 2.6
Time: 22.8s
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)}{sin \cdot \left(x \cdot cos\right)} \cdot \frac{1}{sin \cdot \left(x \cdot cos\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 28.0

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

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{\left(sin \cdot \left(x \cdot cos\right)\right) \cdot \left(sin \cdot \left(x \cdot cos\right)\right)}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity2.9

    \[\leadsto \frac{\color{blue}{1 \cdot \cos \left(2 \cdot x\right)}}{\left(sin \cdot \left(x \cdot cos\right)\right) \cdot \left(sin \cdot \left(x \cdot cos\right)\right)}\]
  5. Applied times-frac2.6

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

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

Runtime

Time bar (total: 22.8s)Debug logProfile

herbie shell --seed 2018220 +o rules:numerics
(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))))