Average Error: 28.4 → 16.2
Time: 7.6s
Precision: binary64
\[\]
\[\]
\[\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Derivation

  1. Split input into 2 regimes
  2. if b < 486.3784181750889

    1. Initial program 16.2

      \[\]
    2. Simplified16.2

      \[\leadsto \]
    3. Using strategy rm
    4. Applied flip--16.2

      \[\leadsto \]
    5. Simplified15.2

      \[\leadsto \]
    6. Simplified15.2

      \[\leadsto \]

    if 486.3784181750889 < b

    1. Initial program 35.6

      \[\]
    2. Simplified35.6

      \[\leadsto \]
    3. Taylor expanded around inf 16.8

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

    \[\leadsto \]

Reproduce

herbie shell --seed 2020191 
(FPCore (a b c)
  :name "Quadratic roots, narrow range"
  :precision binary64
  :pre (and (< 1.0536712127723509e-08 a 94906265.62425156) (< 1.0536712127723509e-08 b 94906265.62425156) (< 1.0536712127723509e-08 c 94906265.62425156))
  (/ (+ (neg b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))