Average Error: 27.2 → 2.5
Time: 41.3s
Precision: 64
Internal Precision: 384
\[\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}\]
\[\frac{\frac{\cos \left(2 \cdot x\right)}{cos \cdot \left|sin \cdot x\right|}}{cos \cdot \left|sin \cdot x\right|}\]

Error

Bits error versus x

Bits error versus cos

Bits error versus sin

Derivation

  1. Initial program 27.2

    \[\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt27.2

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \color{blue}{\left(\sqrt{\left(x \cdot {sin}^{2}\right) \cdot x} \cdot \sqrt{\left(x \cdot {sin}^{2}\right) \cdot x}\right)}}\]
  4. Applied simplify27.2

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\color{blue}{\left|sin \cdot x\right|} \cdot \sqrt{\left(x \cdot {sin}^{2}\right) \cdot x}\right)}\]
  5. Applied simplify19.1

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left|sin \cdot x\right| \cdot \color{blue}{\left|sin \cdot x\right|}\right)}\]
  6. Using strategy rm
  7. Applied pow219.1

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \color{blue}{{\left(\left|sin \cdot x\right|\right)}^{2}}}\]
  8. Applied pow-prod-down2.8

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{\color{blue}{{\left(cos \cdot \left|sin \cdot x\right|\right)}^{2}}}\]
  9. Using strategy rm
  10. Applied unpow22.8

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left(cos \cdot \left|sin \cdot x\right|\right) \cdot \left(cos \cdot \left|sin \cdot x\right|\right)}}\]
  11. Applied associate-/r*2.5

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

Runtime

Time bar (total: 41.3s)Debug logProfile

herbie shell --seed '#(1064300848 3212030778 2049303162 3567222883 2277747821 1384278011)' +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))))