Average Error: 0.0 → 0.0
Time: 6.6s
Precision: 64
Internal precision: 384
\[\left(\left(\left(1.0 + 0.5 \cdot x\right) - \left(0.125 \cdot x\right) \cdot x\right) + \left(\left(0.0625 \cdot x\right) \cdot x\right) \cdot x\right) - \left(\left(\left(0.0390625 \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\]
\[\left(1.0 + \left(0.5 - 0.125 \cdot x\right) \cdot x\right) + {x}^3 \cdot \left(0.0625 - 0.0390625 \cdot x\right)\]

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\left(\left(\left(1.0 + 0.5 \cdot x\right) - \left(0.125 \cdot x\right) \cdot x\right) + \left(\left(0.0625 \cdot x\right) \cdot x\right) \cdot x\right) - \left(\left(\left(0.0390625 \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\]
  2. Applied simplify 0.0

    \[\leadsto \color{blue}{\left(\left(1.0 + x \cdot 0.5\right) - x \cdot \left(x \cdot 0.125\right)\right) + {x}^3 \cdot \left(0.0625 - 0.0390625 \cdot x\right)}\]
  3. Using strategy rm
  4. Applied associate--l+ 0.0

    \[\leadsto \color{blue}{\left(1.0 + \left(x \cdot 0.5 - x \cdot \left(x \cdot 0.125\right)\right)\right)} + {x}^3 \cdot \left(0.0625 - 0.0390625 \cdot x\right)\]
  5. Applied simplify 0.0

    \[\leadsto \left(1.0 + \color{blue}{\left(0.5 - 0.125 \cdot x\right) \cdot x}\right) + {x}^3 \cdot \left(0.0625 - 0.0390625 \cdot x\right)\]
  6. Removed slow pow expressions

Runtime

Time bar (total: 6.6s) Debug log

Please include this information when filing a bug report:

herbie shell --seed '#(3052192724 3812927732 3686175817 630908657 2373248591 511094450)'
(FPCore (x)
  :name "sqroot"
  :pre (<= 0 x 1)
  (- (+ (- (+ 1.0 (* 0.5 x)) (* (* 0.125 x) x)) (* (* (* 0.0625 x) x) x)) (* (* (* (* 0.0390625 x) x) x) x)))