Average Error: 27.1 → 2.4
Time: 23.6s
Precision: 64
Internal Precision: 128
\[\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)}{\left(x \cdot cos\right) \cdot sin} \cdot \frac{1}{\left(x \cdot cos\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 27.1

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

    \[\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 associate-/r*2.4

    \[\leadsto \color{blue}{\frac{\frac{\cos \left(2 \cdot x\right)}{\left(x \cdot cos\right) \cdot sin}}{\left(x \cdot cos\right) \cdot sin}}\]
  5. Using strategy rm
  6. Applied div-inv2.4

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

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

Runtime

Time bar (total: 23.6s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes2.42.41.50.90%
herbie shell --seed 2018353 +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))))