Average Error: 12.1 → 9.3
Time: 12.4s
Precision: binary64
\[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
\[\begin{array}{l} \mathbf{if}\;c \leq -2.210704941227226 \cdot 10^{-47} \lor \neg \left(c \leq 3.620608584093998 \cdot 10^{-11}\right):\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(b \cdot \left(a \cdot i\right) - c \cdot \left(z \cdot b\right)\right)\right) + \left(c \cdot \left(t \cdot j\right) - i \cdot \left(y \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(\sqrt[3]{b} \cdot \left(a \cdot i - c \cdot z\right)\right)\right) + j \cdot \left(c \cdot t - y \cdot i\right)\\ \end{array}\]
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\begin{array}{l}
\mathbf{if}\;c \leq -2.210704941227226 \cdot 10^{-47} \lor \neg \left(c \leq 3.620608584093998 \cdot 10^{-11}\right):\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(b \cdot \left(a \cdot i\right) - c \cdot \left(z \cdot b\right)\right)\right) + \left(c \cdot \left(t \cdot j\right) - i \cdot \left(y \cdot j\right)\right)\\

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

\end{array}
(FPCore (x y z t a b c i j)
 :precision binary64
 (+
  (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
  (* j (- (* c t) (* i y)))))
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= c -2.210704941227226e-47) (not (<= c 3.620608584093998e-11)))
   (+
    (+ (* x (- (* y z) (* t a))) (- (* b (* a i)) (* c (* z b))))
    (- (* c (* t j)) (* i (* y j))))
   (+
    (+
     (* x (- (* y z) (* t a)))
     (* (* (cbrt b) (cbrt b)) (* (cbrt b) (- (* a i) (* c z)))))
    (* j (- (* c t) (* y i))))))
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) (i * a)))))))) + ((double) (j * ((double) (((double) (c * t)) - ((double) (i * y))))))));
}
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (((c <= -2.210704941227226e-47) || !(c <= 3.620608584093998e-11))) {
		tmp = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) + ((double) (((double) (b * ((double) (a * i)))) - ((double) (c * ((double) (z * b)))))))) + ((double) (((double) (c * ((double) (t * j)))) - ((double) (i * ((double) (y * j))))))));
	} else {
		tmp = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) + ((double) (((double) (((double) cbrt(b)) * ((double) cbrt(b)))) * ((double) (((double) cbrt(b)) * ((double) (((double) (a * i)) - ((double) (c * z)))))))))) + ((double) (j * ((double) (((double) (c * t)) - ((double) (y * i))))))));
	}
	return tmp;
}

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.1
Target15.9
Herbie9.3
\[\begin{array}{l} \mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\ \;\;\;\;x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\ \mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\ \mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\ \;\;\;\;x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\ \mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if c < -2.21070494122722616e-47 or 3.6206085840939979e-11 < c

    1. Initial program Error: 15.4 bits

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    2. Using strategy rm
    3. Applied sub-negError: 15.4 bits

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \color{blue}{\left(c \cdot t + \left(-i \cdot y\right)\right)}\]
    4. Applied distribute-lft-inError: 15.4 bits

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \color{blue}{\left(j \cdot \left(c \cdot t\right) + j \cdot \left(-i \cdot y\right)\right)}\]
    5. SimplifiedError: 12.3 bits

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(\color{blue}{c \cdot \left(j \cdot t\right)} + j \cdot \left(-i \cdot y\right)\right)\]
    6. SimplifiedError: 12.3 bits

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(c \cdot \left(j \cdot t\right) + \color{blue}{i \cdot \left(j \cdot \left(-y\right)\right)}\right)\]
    7. Using strategy rm
    8. Applied sub-negError: 12.3 bits

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \color{blue}{\left(c \cdot z + \left(-i \cdot a\right)\right)}\right) + \left(c \cdot \left(j \cdot t\right) + i \cdot \left(j \cdot \left(-y\right)\right)\right)\]
    9. Applied distribute-lft-inError: 12.3 bits

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)}\right) + \left(c \cdot \left(j \cdot t\right) + i \cdot \left(j \cdot \left(-y\right)\right)\right)\]
    10. SimplifiedError: 8.8 bits

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\color{blue}{c \cdot \left(b \cdot z\right)} + b \cdot \left(-i \cdot a\right)\right)\right) + \left(c \cdot \left(j \cdot t\right) + i \cdot \left(j \cdot \left(-y\right)\right)\right)\]
    11. SimplifiedError: 8.8 bits

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

    if -2.21070494122722616e-47 < c < 3.6206085840939979e-11

    1. Initial program Error: 9.5 bits

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

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \sqrt[3]{b}\right)} \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Applied associate-*l*Error: 9.8 bits

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(\sqrt[3]{b} \cdot \left(c \cdot z - i \cdot a\right)\right)}\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. SimplifiedError: 9.8 bits

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \color{blue}{\left(\left(c \cdot z - i \cdot a\right) \cdot \sqrt[3]{b}\right)}\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
  3. Recombined 2 regimes into one program.
  4. Final simplificationError: 9.3 bits

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.210704941227226 \cdot 10^{-47} \lor \neg \left(c \leq 3.620608584093998 \cdot 10^{-11}\right):\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(b \cdot \left(a \cdot i\right) - c \cdot \left(z \cdot b\right)\right)\right) + \left(c \cdot \left(t \cdot j\right) - i \cdot \left(y \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(\sqrt[3]{b} \cdot \left(a \cdot i - c \cdot z\right)\right)\right) + j \cdot \left(c \cdot t - y \cdot i\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2020204 
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (if (< t -8.120978919195912e-33) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -4.712553818218485e-169) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0))) (+ (* c t) (* i y)))) (if (< t -7.633533346031584e-308) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 1.0535888557455487e-139) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))))

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