Average Error: 27.3 → 2.7
Time: 35.4s
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{(e^{\log_* (1 + \cos \left(2 \cdot x\right))} - 1)^*}{{\left(\left|cos \cdot \left(x \cdot sin\right)\right|\right)}^{2}}\]

Error

Bits error versus x

Bits error versus cos

Bits error versus sin

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. Using strategy rm
  3. Applied add-sqr-sqrt27.4

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

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

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{\left|\left(x \cdot cos\right) \cdot sin\right| \cdot \color{blue}{\left|\left(x \cdot cos\right) \cdot sin\right|}}\]
  6. Taylor expanded around 0 2.7

    \[\leadsto \frac{\cos \left(2 \cdot x\right)}{\color{blue}{{\left(\left|cos \cdot \left(x \cdot sin\right)\right|\right)}^{2}}}\]
  7. Using strategy rm
  8. Applied expm1-log1p-u2.7

    \[\leadsto \frac{\color{blue}{(e^{\log_* (1 + \cos \left(2 \cdot x\right))} - 1)^*}}{{\left(\left|cos \cdot \left(x \cdot sin\right)\right|\right)}^{2}}\]

Runtime

Time bar (total: 35.4s)Debug logProfile

herbie shell --seed '#(1070355188 2193211668 3977393919 3454156579 3755371326 1656365382)' +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))))