Average Error: 36.0 → 31.8
Time: 8.4s
Precision: binary64
\[\]
\[\]

Error

Bits error versus g

Bits error versus h

Bits error versus a

Derivation

  1. Split input into 2 regimes
  2. if g < -4.39214081702909474e-199

    1. Initial program 35.1

      \[\]
    2. Using strategy rm
    3. Applied associate-*l/35.1

      \[\leadsto \]
    4. Applied cbrt-div31.6

      \[\leadsto \]
    5. Simplified31.6

      \[\leadsto \]

    if -4.39214081702909474e-199 < g

    1. Initial program 36.7

      \[\]
    2. Using strategy rm
    3. Applied associate-*l/36.7

      \[\leadsto \]
    4. Applied cbrt-div33.0

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

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

    \[\leadsto \]

Reproduce

herbie shell --seed 2020191 
(FPCore (g h a)
  :name "2-ancestry mixing, positive discriminant"
  :precision binary64
  (+ (cbrt (* (/ 1.0 (* 2.0 a)) (+ (neg g) (sqrt (- (* g g) (* h h)))))) (cbrt (* (/ 1.0 (* 2.0 a)) (- (neg g) (sqrt (- (* g g) (* h h))))))))