Average Error: 12.4 → 9.0
Time: 11.0s
Precision: binary64
\[\]
\[\]
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) - ((double) (b * ((double) (((double) (c * z)) - ((double) (t * i)))))))) + ((double) (j * ((double) (((double) (c * a)) - ((double) (y * i))))))));
}
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double VAR;
	if (((j <= -1.823492765131761e+24) || !(j <= 1.0557116831530113e+19))) {
		VAR = ((double) (((double) (((double) (((double) (z * ((double) (y * x)))) - ((double) (t * ((double) (x * a)))))) + ((double) (b * ((double) (((double) (t * i)) - ((double) (z * c)))))))) + ((double) (j * ((double) (((double) (a * c)) - ((double) (y * i))))))));
	} else {
		VAR = ((double) (((double) (((double) (x * ((double) (((double) (z * y)) - ((double) (t * a)))))) + ((double) (((double) (t * ((double) (b * i)))) - ((double) (c * ((double) (z * b)))))))) + ((double) (((double) (c * ((double) (j * a)))) - ((double) (i * ((double) (j * y))))))));
	}
	return VAR;
}

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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original12.4
Target20.4
Herbie9.0
\[\]

Derivation

  1. Split input into 2 regimes
  2. if j < -1.82349276513176103e24 or 10557116831530113000 < j

    1. Initial program 7.7

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

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

      \[\leadsto \]
    5. Simplified7.7

      \[\leadsto \]
    6. Simplified7.6

      \[\leadsto \]

    if -1.82349276513176103e24 < j < 10557116831530113000

    1. Initial program 15.1

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

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

      \[\leadsto \]
    5. Simplified12.6

      \[\leadsto \]
    6. Simplified9.8

      \[\leadsto \]
    7. Using strategy rm
    8. Applied sub-neg9.8

      \[\leadsto \]
    9. Applied distribute-lft-in9.8

      \[\leadsto \]
    10. Simplified9.6

      \[\leadsto \]
    11. Using strategy rm
    12. Applied associate-*r*10.5

      \[\leadsto \]
    13. Taylor expanded around inf 10.6

      \[\leadsto \]
    14. Simplified9.8

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

    \[\leadsto \]

Reproduce

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