Average Error: 39.1 → 0.0
Time: 2.8s
Precision: 64
Internal Precision: 1408
\[\left(x + 1\right) \cdot \left(x + 1\right) - 1\]
\[x \cdot \left(2 + x\right)\]

Error

Bits error versus x

Derivation

  1. Initial program 39.1

    \[\left(x + 1\right) \cdot \left(x + 1\right) - 1\]
  2. Applied simplify0.0

    \[\leadsto \color{blue}{x + (x \cdot x + x)_*}\]
  3. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{{x}^{2} + 2 \cdot x}\]
  4. Applied simplify0.0

    \[\leadsto \color{blue}{x \cdot \left(2 + x\right)}\]

Runtime

Time bar (total: 2.8s)Debug logProfile

herbie shell --seed '#(1064173506 2580572819 2847706409 4129882574 1125180799 1845288547)' +o rules:numerics
(FPCore (x)
  :name "Expanding a square"
  (- (* (+ x 1) (+ x 1)) 1))