Average Error: 33.3 → 10.1
Time: 4.7s
Precision: binary64
\[\]
\[\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Derivation

  1. Split input into 3 regimes
  2. if b < -1.84068970466224001e150

    1. Initial program 62.4

      \[\]
    2. Simplified62.4

      \[\leadsto \]
    3. Taylor expanded around -inf 11.2

      \[\leadsto \]
    4. Simplified2.6

      \[\leadsto \]

    if -1.84068970466224001e150 < b < 5.90062245140958138e-81

    1. Initial program 11.8

      \[\]
    2. Simplified11.8

      \[\leadsto \]
    3. Using strategy rm
    4. Applied associate-*r*11.8

      \[\leadsto \]
    5. Using strategy rm
    6. Applied associate-/r*11.8

      \[\leadsto \]
    7. Simplified11.7

      \[\leadsto \]

    if 5.90062245140958138e-81 < b

    1. Initial program 51.9

      \[\]
    2. Simplified52.0

      \[\leadsto \]
    3. Using strategy rm
    4. Applied associate-*r*51.9

      \[\leadsto \]
    5. Taylor expanded around inf 10.2

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

    \[\leadsto \]

Reproduce

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