Average Error: 34.4 → 6.9
Time: 5.9s
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.4636905970896212e146

    1. Initial program 61.1

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

      \[\leadsto \]
    3. Simplified2.8

      \[\leadsto \]

    if -1.4636905970896212e146 < b_2 < -2.093057343449044e-310

    1. Initial program 9.3

      \[\]
    2. Using strategy rm
    3. Applied div-inv9.4

      \[\leadsto \]

    if -2.093057343449044e-310 < b_2 < 7.06372498598648321e53

    1. Initial program 29.5

      \[\]
    2. Using strategy rm
    3. Applied flip-+29.6

      \[\leadsto \]
    4. Simplified16.4

      \[\leadsto \]
    5. Using strategy rm
    6. Applied *-un-lft-identity16.4

      \[\leadsto \]
    7. Applied *-un-lft-identity16.4

      \[\leadsto \]
    8. Applied times-frac16.4

      \[\leadsto \]
    9. Simplified16.4

      \[\leadsto \]
    10. Simplified8.8

      \[\leadsto \]

    if 7.06372498598648321e53 < b_2

    1. Initial program 57.2

      \[\]
    2. Taylor expanded around inf 3.9

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

    \[\leadsto \]

Reproduce

herbie shell --seed 2020179 
(FPCore (a b_2 c)
  :name "quad2p (problem 3.2.1, positive)"
  :precision binary64
  (/ (+ (neg b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))