Average Error: 28.6 → 16.2
Time: 6.0s
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 < 1265.74682565733906

    1. Initial program 17.3

      \[\]
    2. Simplified17.3

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

      \[\leadsto \]
    5. Simplified16.4

      \[\leadsto \]
    6. Simplified16.4

      \[\leadsto \]

    if 1265.74682565733906 < b

    1. Initial program 36.6

      \[\]
    2. Simplified36.6

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

      \[\leadsto \]
    4. Simplified16.1

      \[\leadsto \]
    5. Using strategy rm
    6. Applied clear-num16.1

      \[\leadsto \]
    7. Simplified16.1

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

    \[\leadsto \]

Reproduce

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