Average Error: 0.0 → 0.0
Time: 4.3s
Precision: 64
Internal precision: 384
\[\left(\left(x - \frac{\left(x \cdot x\right) \cdot x}{6.0}\right) + \frac{\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot x\right) \cdot x}{120}\right) - \frac{\left(\left(\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x}{5040}\]
\[\left(x - \frac{x \cdot x}{\frac{6.0}{x}}\right) + \left(\frac{{\left(x \cdot x\right)}^2}{\frac{120}{x}} - \frac{{x}^3}{\frac{\frac{5040}{x}}{{x}^3}}\right)\]

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\left(\left(x - \frac{\left(x \cdot x\right) \cdot x}{6.0}\right) + \frac{\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot x\right) \cdot x}{120}\right) - \frac{\left(\left(\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x}{5040}\]
  2. Applied simplify 0.0

    \[\leadsto \color{blue}{\left(x - \frac{x \cdot x}{\frac{6.0}{x}}\right) + \left(\frac{{\left(x \cdot x\right)}^2}{\frac{120}{x}} - \frac{{x}^3}{\frac{\frac{5040}{x}}{{x}^3}}\right)}\]
  3. Removed slow pow expressions

Runtime

Time bar (total: 4.3s) Debug log

Please include this information when filing a bug report:

herbie shell --seed '#(3052192724 3812927732 3686175817 630908657 2373248591 511094450)'
(FPCore (x)
  :name "sine"
  :pre (< -1.57079632679 x 1.57079632679)
  (- (+ (- x (/ (* (* x x) x) 6.0)) (/ (* (* (* (* x x) x) x) x) 120)) (/ (* (* (* (* (* (* x x) x) x) x) x) x) 5040)))