Average Error: 26.7 → 2.6
Time: 1.6m
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{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(cos \cdot x\right) \cdot sin} \cdot \frac{\sqrt[3]{\cos \left(2 \cdot x\right) \cdot \cos \left(2 \cdot x\right)}}{\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 26.7

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

    \[\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 add-cube-cbrt2.9

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{\cos \left(2 \cdot x\right)} \cdot \sqrt[3]{\cos \left(2 \cdot x\right)}\right) \cdot \sqrt[3]{\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)}\]
  5. Applied times-frac2.7

    \[\leadsto \color{blue}{\frac{\sqrt[3]{\cos \left(2 \cdot x\right)} \cdot \sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(x \cdot cos\right) \cdot sin} \cdot \frac{\sqrt[3]{\cos \left(2 \cdot x\right)}}{\left(x \cdot cos\right) \cdot sin}}\]
  6. Using strategy rm
  7. Applied cbrt-unprod2.6

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

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

Runtime

Time bar (total: 1.6m)Debug logProfile

herbie shell --seed 2018251 +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))))