Average Error: 34.1 → 6.8
Time: 5.6s
Precision: binary64
\[\]
\[\]

Error

Bits error versus a

Bits error versus b_2

Bits error versus c

Derivation

  1. Split input into 4 regimes
  2. if b_2 < -3.3284508813462579e153

    1. Initial program 64.0

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

      \[\leadsto \]

    if -3.3284508813462579e153 < b_2 < 5.77124189426153479e-297

    1. Initial program 34.2

      \[\]
    2. Using strategy rm
    3. Applied flip--34.2

      \[\leadsto \]
    4. Simplified15.8

      \[\leadsto \]
    5. Simplified15.8

      \[\leadsto \]
    6. Using strategy rm
    7. Applied clear-num16.0

      \[\leadsto \]
    8. Simplified8.8

      \[\leadsto \]

    if 5.77124189426153479e-297 < b_2 < 3.08628841913423875e108

    1. Initial program 8.8

      \[\]
    2. Using strategy rm
    3. Applied div-inv9.0

      \[\leadsto \]

    if 3.08628841913423875e108 < b_2

    1. Initial program 47.4

      \[\]
    2. Taylor expanded around inf 3.8

      \[\leadsto \]
    3. Simplified3.8

      \[\leadsto \]
  3. Recombined 4 regimes into one program.
  4. Final simplification6.8

    \[\leadsto \]

Reproduce

herbie shell --seed 2020191 
(FPCore (a b_2 c)
  :name "quad2m (problem 3.2.1, negative)"
  :precision binary64
  (/ (- (neg b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))