Average Error: 34.3 → 6.9
Time: 4.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 < -1.7681897708759382e72

    1. Initial program 58.7

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

      \[\leadsto \]

    if -1.7681897708759382e72 < b_2 < 9.9383213207497548e-267

    1. Initial program 30.1

      \[\]
    2. Using strategy rm
    3. Applied clear-num30.2

      \[\leadsto \]
    4. Using strategy rm
    5. Applied flip--30.2

      \[\leadsto \]
    6. Applied associate-/r/30.3

      \[\leadsto \]
    7. Applied associate-/r*30.3

      \[\leadsto \]
    8. Simplified17.0

      \[\leadsto \]
    9. Taylor expanded around 0 10.2

      \[\leadsto \]

    if 9.9383213207497548e-267 < b_2 < 5.17055663965606445e125

    1. Initial program 8.3

      \[\]
    2. Using strategy rm
    3. Applied clear-num8.4

      \[\leadsto \]

    if 5.17055663965606445e125 < b_2

    1. Initial program 54.4

      \[\]
    2. Taylor expanded around inf 11.1

      \[\leadsto \]
    3. Simplified3.5

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

    \[\leadsto \]

Reproduce

herbie shell --seed 2020190 
(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))