Average Error: 30.2 → 0.4
Time: 2.2s
Precision: binary64
\[\]
\[\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if x < 1.911069691996156e-310

    1. Initial program 29.7

      \[\]
    2. Taylor expanded around -inf 0.5

      \[\leadsto \]
    3. Simplified0.5

      \[\leadsto \]
    4. Using strategy rm
    5. Applied add-cube-cbrt0.5

      \[\leadsto \]
    6. Applied distribute-lft-neg-in0.5

      \[\leadsto \]
    7. Applied associate-*r*0.4

      \[\leadsto \]
    8. Simplified0.4

      \[\leadsto \]

    if 1.911069691996156e-310 < x

    1. Initial program 30.7

      \[\]
    2. Using strategy rm
    3. Applied sqrt-prod0.4

      \[\leadsto \]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.4

    \[\leadsto \]

Reproduce

herbie shell --seed 2020190 
(FPCore (x)
  :name "sqrt B"
  :precision binary64
  (sqrt (* (* 2.0 x) x)))