Average Error: 12.2 → 8.8
Time: 23.3s
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.2
Target19.9
Herbie8.8
\[\]

Derivation

  1. Split input into 2 regimes
  2. if j < -1.1329614540433217e-41 or 1.7747111683562279e26 < j

    1. Initial program 7.8

      \[\]
    2. Simplified7.8

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

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

      \[\leadsto \]
    6. Simplified8.4

      \[\leadsto \]
    7. Simplified8.7

      \[\leadsto \]
    8. Using strategy rm
    9. Applied associate-*r*8.3

      \[\leadsto \]

    if -1.1329614540433217e-41 < j < 1.7747111683562279e26

    1. Initial program 15.2

      \[\]
    2. Simplified15.2

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

      \[\leadsto \]
    5. Applied distribute-lft-in15.2

      \[\leadsto \]
    6. Simplified15.0

      \[\leadsto \]
    7. Simplified14.8

      \[\leadsto \]
    8. Using strategy rm
    9. Applied add-cube-cbrt15.2

      \[\leadsto \]
    10. Applied associate-*r*15.2

      \[\leadsto \]
    11. Simplified15.2

      \[\leadsto \]
    12. Using strategy rm
    13. Applied sub-neg15.2

      \[\leadsto \]
    14. Applied distribute-lft-in15.2

      \[\leadsto \]
    15. Simplified12.4

      \[\leadsto \]
    16. Simplified9.1

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

    \[\leadsto \]

Reproduce

herbie shell --seed 2020179 
(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)))))