Average Error: 44.3 → 10.8
Time: 5.7s
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 < 1.05967144796170832e-4

    1. Initial program 18.8

      \[\]
    2. Simplified18.8

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

      \[\leadsto \]
    5. Simplified17.8

      \[\leadsto \]
    6. Simplified17.8

      \[\leadsto \]

    if 1.05967144796170832e-4 < b

    1. Initial program 46.1

      \[\]
    2. Simplified46.1

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

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

    \[\leadsto \]

Reproduce

herbie shell --seed 2020192 
(FPCore (a b c)
  :name "Quadratic roots, medium range"
  :precision binary64
  :pre (and (< 1.1102230246251565e-16 a 9007199254740992.0) (< 1.1102230246251565e-16 b 9007199254740992.0) (< 1.1102230246251565e-16 c 9007199254740992.0))
  (/ (+ (neg b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))