Average Error: 32.2 → 32.2
Time: 13.8s
Precision: binary64
\[\frac{\left(\left(\left(\left(-0.5\right) \cdot x\right) \cdot \sin x - 3 \cdot {\left(\cos \left(0.5 \cdot x\right)\right)}^{2}\right) + 2 \cdot \cos \left(0.5 \cdot x\right)\right) + 1}{\left(\left(\left(-0.5\right) \cdot \sin x - 3 \cdot {\left(\cos \left(0.5 \cdot x\right)\right)}^{2}\right) + 2 \cdot \cos \left(0.5 \cdot x\right)\right) + 1}\]
\[\frac{\left(\left(\left(\left(-0.5\right) \cdot x\right) \cdot \sin x - 3 \cdot {\left(\cos \left(0.5 \cdot x\right)\right)}^{2}\right) + 2 \cdot \cos \left(0.5 \cdot x\right)\right) + 1}{\left(\left(\left(-0.5\right) \cdot \sin x - 3 \cdot {\left(\cos \left(0.5 \cdot x\right)\right)}^{2}\right) + 2 \cdot \cos \left(0.5 \cdot x\right)\right) + 1}\]

Error

Bits error versus x

Derivation

  1. Initial program 32.2

    \[\frac{\left(\left(\left(\left(-0.5\right) \cdot x\right) \cdot \sin x - 3 \cdot {\left(\cos \left(0.5 \cdot x\right)\right)}^{2}\right) + 2 \cdot \cos \left(0.5 \cdot x\right)\right) + 1}{\left(\left(\left(-0.5\right) \cdot \sin x - 3 \cdot {\left(\cos \left(0.5 \cdot x\right)\right)}^{2}\right) + 2 \cdot \cos \left(0.5 \cdot x\right)\right) + 1}\]
  2. Final simplification32.2

    \[\leadsto \frac{\left(\left(\left(\left(-0.5\right) \cdot x\right) \cdot \sin x - 3 \cdot {\left(\cos \left(0.5 \cdot x\right)\right)}^{2}\right) + 2 \cdot \cos \left(0.5 \cdot x\right)\right) + 1}{\left(\left(\left(-0.5\right) \cdot \sin x - 3 \cdot {\left(\cos \left(0.5 \cdot x\right)\right)}^{2}\right) + 2 \cdot \cos \left(0.5 \cdot x\right)\right) + 1}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x)
  :name "(/ (+ (+ (- (* (* (- 0.5) x) (sin x)) (* 3 (pow (cos (* 0.5 x)) 2))) (* 2 (cos (* 0.5 x)))) 1) (+ (+ (- (* (- 0.5) (sin x)) (* 3 (pow (cos (* 0.5 x)) 2))) (* 2 (cos (* 0.5 x)))) 1))"
  :precision binary64
  (/ (+ (+ (- (* (* (neg 0.5) x) (sin x)) (* 3.0 (pow (cos (* 0.5 x)) 2.0))) (* 2.0 (cos (* 0.5 x)))) 1.0) (+ (+ (- (* (neg 0.5) (sin x)) (* 3.0 (pow (cos (* 0.5 x)) 2.0))) (* 2.0 (cos (* 0.5 x)))) 1.0)))