Average Error: 11.9 → 12.2
Time: 27.7s
Precision: 64
\[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\]
\[\left(a \cdot c - y \cdot i\right) \cdot j + \left(\left(z \cdot y - t \cdot a\right) \cdot x - \left(\sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b} \cdot \sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b}\right) \cdot \sqrt[3]{\sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b} \cdot \left(\sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b} \cdot \sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b}\right)}\right)\]
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\left(a \cdot c - y \cdot i\right) \cdot j + \left(\left(z \cdot y - t \cdot a\right) \cdot x - \left(\sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b} \cdot \sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b}\right) \cdot \sqrt[3]{\sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b} \cdot \left(\sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b} \cdot \sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b}\right)}\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r43540024 = x;
        double r43540025 = y;
        double r43540026 = z;
        double r43540027 = r43540025 * r43540026;
        double r43540028 = t;
        double r43540029 = a;
        double r43540030 = r43540028 * r43540029;
        double r43540031 = r43540027 - r43540030;
        double r43540032 = r43540024 * r43540031;
        double r43540033 = b;
        double r43540034 = c;
        double r43540035 = r43540034 * r43540026;
        double r43540036 = i;
        double r43540037 = r43540028 * r43540036;
        double r43540038 = r43540035 - r43540037;
        double r43540039 = r43540033 * r43540038;
        double r43540040 = r43540032 - r43540039;
        double r43540041 = j;
        double r43540042 = r43540034 * r43540029;
        double r43540043 = r43540025 * r43540036;
        double r43540044 = r43540042 - r43540043;
        double r43540045 = r43540041 * r43540044;
        double r43540046 = r43540040 + r43540045;
        return r43540046;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r43540047 = a;
        double r43540048 = c;
        double r43540049 = r43540047 * r43540048;
        double r43540050 = y;
        double r43540051 = i;
        double r43540052 = r43540050 * r43540051;
        double r43540053 = r43540049 - r43540052;
        double r43540054 = j;
        double r43540055 = r43540053 * r43540054;
        double r43540056 = z;
        double r43540057 = r43540056 * r43540050;
        double r43540058 = t;
        double r43540059 = r43540058 * r43540047;
        double r43540060 = r43540057 - r43540059;
        double r43540061 = x;
        double r43540062 = r43540060 * r43540061;
        double r43540063 = r43540056 * r43540048;
        double r43540064 = r43540058 * r43540051;
        double r43540065 = r43540063 - r43540064;
        double r43540066 = b;
        double r43540067 = r43540065 * r43540066;
        double r43540068 = cbrt(r43540067);
        double r43540069 = r43540068 * r43540068;
        double r43540070 = r43540068 * r43540069;
        double r43540071 = cbrt(r43540070);
        double r43540072 = r43540069 * r43540071;
        double r43540073 = r43540062 - r43540072;
        double r43540074 = r43540055 + r43540073;
        return r43540074;
}

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

Original11.9
Target18.9
Herbie12.2
\[\begin{array}{l} \mathbf{if}\;x \lt -1.469694296777705 \cdot 10^{-64}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;x \lt 3.2113527362226803 \cdot 10^{-147}:\\ \;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - j \cdot \left(c \cdot a - y \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \end{array}\]

Derivation

  1. Initial program 11.9

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\]
  2. Using strategy rm
  3. Applied add-cube-cbrt12.2

    \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(\sqrt[3]{b \cdot \left(c \cdot z - t \cdot i\right)} \cdot \sqrt[3]{b \cdot \left(c \cdot z - t \cdot i\right)}\right) \cdot \sqrt[3]{b \cdot \left(c \cdot z - t \cdot i\right)}}\right) + j \cdot \left(c \cdot a - y \cdot i\right)\]
  4. Using strategy rm
  5. Applied add-cbrt-cube12.2

    \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\sqrt[3]{b \cdot \left(c \cdot z - t \cdot i\right)} \cdot \sqrt[3]{b \cdot \left(c \cdot z - t \cdot i\right)}\right) \cdot \color{blue}{\sqrt[3]{\left(\sqrt[3]{b \cdot \left(c \cdot z - t \cdot i\right)} \cdot \sqrt[3]{b \cdot \left(c \cdot z - t \cdot i\right)}\right) \cdot \sqrt[3]{b \cdot \left(c \cdot z - t \cdot i\right)}}}\right) + j \cdot \left(c \cdot a - y \cdot i\right)\]
  6. Final simplification12.2

    \[\leadsto \left(a \cdot c - y \cdot i\right) \cdot j + \left(\left(z \cdot y - t \cdot a\right) \cdot x - \left(\sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b} \cdot \sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b}\right) \cdot \sqrt[3]{\sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b} \cdot \left(\sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b} \cdot \sqrt[3]{\left(z \cdot c - t \cdot i\right) \cdot b}\right)}\right)\]

Reproduce

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

  :herbie-target
  (if (< x -1.469694296777705e-64) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* 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) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i))))))

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