Average Error: 0.2 → 0.1
Time: 12.1s
Precision: 64
Internal Precision: 384
\[\frac{x \cdot x - 3.0}{6.0}\]
\[0.16666666666666666 \cdot {x}^{2} - 0.5\]

Error

Bits error versus x

Target

Original0.2
Target0.2
Herbie0.1
\[\frac{x \cdot x - 3.0}{6.0}\]

Derivation

  1. Initial program 0.2

    \[\frac{x \cdot x - 3.0}{6.0}\]
  2. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{0.16666666666666666 \cdot {x}^{2} - 0.5}\]
  3. Removed slow pow expressions.

Runtime

Time bar (total: 12.1s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, H"

  :herbie-target
  (/ (- (* x x) 3.0) 6.0)

  (/ (- (* x x) 3.0) 6.0))