Average Error: 34.2 → 6.9
Time: 6.0s
Precision: binary64
\[\]
\[\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Derivation

  1. Split input into 4 regimes
  2. if b < -1.6931695005490156e80

    1. Initial program 43.9

      \[\]
    2. Using strategy rm
    3. Applied associate-/r*43.8

      \[\leadsto \]
    4. Simplified43.8

      \[\leadsto \]
    5. Taylor expanded around -inf 10.6

      \[\leadsto \]
    6. Simplified4.9

      \[\leadsto \]

    if -1.6931695005490156e80 < b < -8.87056301750562387e-257

    1. Initial program 8.6

      \[\]

    if -8.87056301750562387e-257 < b < 1.1734572876339935e72

    1. Initial program 28.8

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

      \[\leadsto \]
    4. Simplified16.4

      \[\leadsto \]
    5. Simplified16.3

      \[\leadsto \]
    6. Using strategy rm
    7. Applied *-un-lft-identity16.3

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

      \[\leadsto \]
    9. Applied times-frac16.2

      \[\leadsto \]
    10. Simplified16.2

      \[\leadsto \]
    11. Simplified10.0

      \[\leadsto \]

    if 1.1734572876339935e72 < b

    1. Initial program 58.0

      \[\]
    2. Taylor expanded around inf 3.2

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

    \[\leadsto \]

Reproduce

herbie shell --seed 2020179 
(FPCore (a b c)
  :name "Cubic critical"
  :precision binary64
  (/ (+ (neg b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))