Average Error: 12.0 → 9.0
Time: 24.0s
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.0
Target19.4
Herbie9.0
\[\]

Derivation

  1. Split input into 2 regimes
  2. if b < -4.2721703133289528e49 or 6122062468061031420 < b

    1. Initial program 6.8

      \[\]
    2. Simplified6.8

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

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

      \[\leadsto \]
    6. Simplified6.8

      \[\leadsto \]
    7. Simplified6.9

      \[\leadsto \]

    if -4.2721703133289528e49 < b < 6122062468061031420

    1. Initial program 14.7

      \[\]
    2. Simplified14.7

      \[\leadsto \]
    3. Using strategy rm
    4. Applied sub-neg14.7

      \[\leadsto \]
    5. Applied distribute-lft-in14.7

      \[\leadsto \]
    6. Simplified12.4

      \[\leadsto \]
    7. Simplified10.0

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

    \[\leadsto \]

Reproduce

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