Average Error: 27.9 → 3.0
Time: 16.9s
Precision: 64
Internal Precision: 320
\[\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}\]
\[\frac{\cos x \cdot \cos x}{\left(\left(cos \cdot x\right) \cdot sin\right) \cdot \left(\left(cos \cdot x\right) \cdot sin\right)} - \frac{\sin x \cdot \sin x}{\left(\left(cos \cdot x\right) \cdot sin\right) \cdot \left(\left(cos \cdot x\right) \cdot sin\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 27.9

    \[\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(\left(x \cdot cos\right) \cdot sin\right) \cdot \left(\left(x \cdot cos\right) \cdot sin\right)}\]
  3. Using strategy rm
  4. Applied cos-23.0

    \[\leadsto \frac{\color{blue}{\cos x \cdot \cos x - \sin x \cdot \sin x}}{\left(\left(x \cdot cos\right) \cdot sin\right) \cdot \left(\left(x \cdot cos\right) \cdot sin\right)}\]
  5. Applied div-sub3.0

    \[\leadsto \color{blue}{\frac{\cos x \cdot \cos x}{\left(\left(x \cdot cos\right) \cdot sin\right) \cdot \left(\left(x \cdot cos\right) \cdot sin\right)} - \frac{\sin x \cdot \sin x}{\left(\left(x \cdot cos\right) \cdot sin\right) \cdot \left(\left(x \cdot cos\right) \cdot sin\right)}}\]
  6. Final simplification3.0

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

Runtime

Time bar (total: 16.9s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes3.03.01.81.10%
herbie shell --seed 2018290 
(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))))