Average Error: 12.5 → 9.9
Time: 26.7s
Precision: binary64
\[\]
\[\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Bits error versus j

Target

Original12.5
Target19.7
Herbie9.9
\[\]

Derivation

  1. Split input into 3 regimes
  2. if x < -4.0532167146120709e40 or 1.0305982793883869e79 < x

    1. Initial program 7.8

      \[\]
    2. Using strategy rm
    3. Applied sub-neg7.8

      \[\leadsto \]
    4. Applied distribute-lft-in7.8

      \[\leadsto \]
    5. Simplified8.0

      \[\leadsto \]
    6. Simplified7.4

      \[\leadsto \]

    if -4.0532167146120709e40 < x < 7.6716773314790099e-193

    1. Initial program 15.8

      \[\]
    2. Using strategy rm
    3. Applied sub-neg15.8

      \[\leadsto \]
    4. Applied distribute-lft-in15.8

      \[\leadsto \]
    5. Simplified12.8

      \[\leadsto \]
    6. Simplified10.1

      \[\leadsto \]

    if 7.6716773314790099e-193 < x < 1.0305982793883869e79

    1. Initial program 11.7

      \[\]
    2. Using strategy rm
    3. Applied add-cube-cbrt12.0

      \[\leadsto \]
    4. Simplified12.0

      \[\leadsto \]
    5. Simplified12.0

      \[\leadsto \]
    6. Using strategy rm
    7. Applied cbrt-prod12.0

      \[\leadsto \]
    8. Using strategy rm
    9. Applied sub-neg12.0

      \[\leadsto \]
    10. Applied distribute-lft-in12.0

      \[\leadsto \]
    11. Simplified12.0

      \[\leadsto \]
    12. Simplified11.8

      \[\leadsto \]
    13. Using strategy rm
    14. Applied associate-*r*12.5

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

    \[\leadsto \]

Reproduce

herbie shell --seed 2020180 
(FPCore (x y z t a b c i j)
  :name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
  :precision binary64

  :herbie-target
  (if (< x -1.469694296777705e-64) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 3.2113527362226803e-147) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i))))))

  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))