Average Error: 28.3 → 16.5
Time: 6.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 < 366.397835786906001

    1. Initial program 15.9

      \[\]
    2. Simplified15.9

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

      \[\leadsto \]
    5. Simplified15.0

      \[\leadsto \]
    6. Simplified15.0

      \[\leadsto \]

    if 366.397835786906001 < b

    1. Initial program 35.0

      \[\]
    2. Simplified35.0

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

      \[\leadsto \]
    4. Simplified17.3

      \[\leadsto \]
    5. Using strategy rm
    6. Applied associate-/l*17.3

      \[\leadsto \]
    7. Simplified17.3

      \[\leadsto \]
    8. Taylor expanded around 0 17.2

      \[\leadsto \]
    9. Simplified17.3

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

    \[\leadsto \]

Reproduce

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