Average Error: 12.3 → 10.1
Time: 26.1s
Precision: 64
\[\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}\;j \le -9.581789170619479121021143638585490423817 \cdot 10^{99}:\\ \;\;\;\;\mathsf{fma}\left(b, a \cdot i - z \cdot c, \left(x \cdot \sqrt[3]{\mathsf{fma}\left(t, -a, z \cdot y\right)}\right) \cdot \left(\sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)} \cdot \sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)}\right)\right) + \mathsf{fma}\left(i, -y, t \cdot c\right) \cdot j\\ \mathbf{elif}\;j \le 1.656476716176859928364799179216327772733 \cdot 10^{-46}:\\ \;\;\;\;\left(\sqrt[3]{b} \cdot \left(\mathsf{fma}\left(i, a, -z \cdot c\right) \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right)\right) + x \cdot \mathsf{fma}\left(-a, t, z \cdot y\right)\right) + \left(t \cdot \left(j \cdot c\right) + \left(i \cdot j\right) \cdot \left(-y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a \cdot i - z \cdot c, \left(\sqrt[3]{x} \cdot \left(\mathsf{fma}\left(t, -a, z \cdot y\right) \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{x}\right) + \mathsf{fma}\left(i, -y, t \cdot c\right) \cdot j\\ \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}\;j \le -9.581789170619479121021143638585490423817 \cdot 10^{99}:\\
\;\;\;\;\mathsf{fma}\left(b, a \cdot i - z \cdot c, \left(x \cdot \sqrt[3]{\mathsf{fma}\left(t, -a, z \cdot y\right)}\right) \cdot \left(\sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)} \cdot \sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)}\right)\right) + \mathsf{fma}\left(i, -y, t \cdot c\right) \cdot j\\

\mathbf{elif}\;j \le 1.656476716176859928364799179216327772733 \cdot 10^{-46}:\\
\;\;\;\;\left(\sqrt[3]{b} \cdot \left(\mathsf{fma}\left(i, a, -z \cdot c\right) \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right)\right) + x \cdot \mathsf{fma}\left(-a, t, z \cdot y\right)\right) + \left(t \cdot \left(j \cdot c\right) + \left(i \cdot j\right) \cdot \left(-y\right)\right)\\

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

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r97642 = x;
        double r97643 = y;
        double r97644 = z;
        double r97645 = r97643 * r97644;
        double r97646 = t;
        double r97647 = a;
        double r97648 = r97646 * r97647;
        double r97649 = r97645 - r97648;
        double r97650 = r97642 * r97649;
        double r97651 = b;
        double r97652 = c;
        double r97653 = r97652 * r97644;
        double r97654 = i;
        double r97655 = r97654 * r97647;
        double r97656 = r97653 - r97655;
        double r97657 = r97651 * r97656;
        double r97658 = r97650 - r97657;
        double r97659 = j;
        double r97660 = r97652 * r97646;
        double r97661 = r97654 * r97643;
        double r97662 = r97660 - r97661;
        double r97663 = r97659 * r97662;
        double r97664 = r97658 + r97663;
        return r97664;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r97665 = j;
        double r97666 = -9.58178917061948e+99;
        bool r97667 = r97665 <= r97666;
        double r97668 = b;
        double r97669 = a;
        double r97670 = i;
        double r97671 = r97669 * r97670;
        double r97672 = z;
        double r97673 = c;
        double r97674 = r97672 * r97673;
        double r97675 = r97671 - r97674;
        double r97676 = x;
        double r97677 = t;
        double r97678 = -r97669;
        double r97679 = y;
        double r97680 = r97672 * r97679;
        double r97681 = fma(r97677, r97678, r97680);
        double r97682 = cbrt(r97681);
        double r97683 = r97676 * r97682;
        double r97684 = fma(r97678, r97677, r97680);
        double r97685 = cbrt(r97684);
        double r97686 = r97685 * r97685;
        double r97687 = r97683 * r97686;
        double r97688 = fma(r97668, r97675, r97687);
        double r97689 = -r97679;
        double r97690 = r97677 * r97673;
        double r97691 = fma(r97670, r97689, r97690);
        double r97692 = r97691 * r97665;
        double r97693 = r97688 + r97692;
        double r97694 = 1.65647671617686e-46;
        bool r97695 = r97665 <= r97694;
        double r97696 = cbrt(r97668);
        double r97697 = -r97674;
        double r97698 = fma(r97670, r97669, r97697);
        double r97699 = r97696 * r97696;
        double r97700 = r97698 * r97699;
        double r97701 = r97696 * r97700;
        double r97702 = r97676 * r97684;
        double r97703 = r97701 + r97702;
        double r97704 = r97665 * r97673;
        double r97705 = r97677 * r97704;
        double r97706 = r97670 * r97665;
        double r97707 = r97706 * r97689;
        double r97708 = r97705 + r97707;
        double r97709 = r97703 + r97708;
        double r97710 = cbrt(r97676);
        double r97711 = r97681 * r97710;
        double r97712 = r97710 * r97711;
        double r97713 = r97712 * r97710;
        double r97714 = fma(r97668, r97675, r97713);
        double r97715 = r97714 + r97692;
        double r97716 = r97695 ? r97709 : r97715;
        double r97717 = r97667 ? r97693 : r97716;
        return r97717;
}

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

Derivation

  1. Split input into 3 regimes
  2. if j < -9.58178917061948e+99

    1. Initial program 7.3

      \[\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. Simplified7.3

      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot c - i \cdot y, j, \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\right)}\]
    3. Using strategy rm
    4. Applied fma-udef7.3

      \[\leadsto \color{blue}{\left(t \cdot c - i \cdot y\right) \cdot j + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)}\]
    5. Simplified7.3

      \[\leadsto \color{blue}{j \cdot \mathsf{fma}\left(i, -y, c \cdot t\right)} + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\]
    6. Using strategy rm
    7. Applied add-cube-cbrt7.5

      \[\leadsto j \cdot \mathsf{fma}\left(i, -y, c \cdot t\right) + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \color{blue}{\left(\left(\sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)} \cdot \sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)}\right)} \cdot x\right)\]
    8. Applied associate-*l*7.5

      \[\leadsto j \cdot \mathsf{fma}\left(i, -y, c \cdot t\right) + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \color{blue}{\left(\sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)} \cdot \sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)}\right) \cdot \left(\sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)} \cdot x\right)}\right)\]
    9. Simplified7.5

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

    if -9.58178917061948e+99 < j < 1.65647671617686e-46

    1. Initial program 14.5

      \[\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. Simplified14.5

      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot c - i \cdot y, j, \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\right)}\]
    3. Using strategy rm
    4. Applied fma-udef14.5

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

      \[\leadsto \color{blue}{j \cdot \mathsf{fma}\left(i, -y, c \cdot t\right)} + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\]
    6. Using strategy rm
    7. Applied fma-udef14.5

      \[\leadsto j \cdot \color{blue}{\left(i \cdot \left(-y\right) + c \cdot t\right)} + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\]
    8. Applied distribute-lft-in14.5

      \[\leadsto \color{blue}{\left(j \cdot \left(i \cdot \left(-y\right)\right) + j \cdot \left(c \cdot t\right)\right)} + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\]
    9. Simplified12.6

      \[\leadsto \left(\color{blue}{\left(-y\right) \cdot \left(i \cdot j\right)} + j \cdot \left(c \cdot t\right)\right) + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\]
    10. Simplified10.5

      \[\leadsto \left(\left(-y\right) \cdot \left(i \cdot j\right) + \color{blue}{t \cdot \left(j \cdot c\right)}\right) + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\]
    11. Using strategy rm
    12. Applied fma-udef10.5

      \[\leadsto \left(\left(-y\right) \cdot \left(i \cdot j\right) + t \cdot \left(j \cdot c\right)\right) + \color{blue}{\left(b \cdot \left(a \cdot i - z \cdot c\right) + \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)}\]
    13. Simplified10.5

      \[\leadsto \left(\left(-y\right) \cdot \left(i \cdot j\right) + t \cdot \left(j \cdot c\right)\right) + \left(\color{blue}{\mathsf{fma}\left(z, -c, i \cdot a\right) \cdot b} + \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\]
    14. Using strategy rm
    15. Applied add-cube-cbrt10.9

      \[\leadsto \left(\left(-y\right) \cdot \left(i \cdot j\right) + t \cdot \left(j \cdot c\right)\right) + \left(\mathsf{fma}\left(z, -c, i \cdot a\right) \cdot \color{blue}{\left(\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \sqrt[3]{b}\right)} + \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\]
    16. Applied associate-*r*10.9

      \[\leadsto \left(\left(-y\right) \cdot \left(i \cdot j\right) + t \cdot \left(j \cdot c\right)\right) + \left(\color{blue}{\left(\mathsf{fma}\left(z, -c, i \cdot a\right) \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right)\right) \cdot \sqrt[3]{b}} + \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\]
    17. Simplified10.9

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

    if 1.65647671617686e-46 < j

    1. Initial program 8.9

      \[\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. Simplified8.9

      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot c - i \cdot y, j, \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\right)}\]
    3. Using strategy rm
    4. Applied fma-udef8.9

      \[\leadsto \color{blue}{\left(t \cdot c - i \cdot y\right) \cdot j + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)}\]
    5. Simplified8.9

      \[\leadsto \color{blue}{j \cdot \mathsf{fma}\left(i, -y, c \cdot t\right)} + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\]
    6. Using strategy rm
    7. Applied add-cube-cbrt9.1

      \[\leadsto j \cdot \mathsf{fma}\left(i, -y, c \cdot t\right) + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot \color{blue}{\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\right)}\right)\]
    8. Applied associate-*r*9.1

      \[\leadsto j \cdot \mathsf{fma}\left(i, -y, c \cdot t\right) + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \color{blue}{\left(\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{x}}\right)\]
    9. Simplified9.1

      \[\leadsto j \cdot \mathsf{fma}\left(i, -y, c \cdot t\right) + \mathsf{fma}\left(b, a \cdot i - z \cdot c, \color{blue}{\left(\left(\mathsf{fma}\left(t, -a, z \cdot y\right) \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\right)} \cdot \sqrt[3]{x}\right)\]
  3. Recombined 3 regimes into one program.
  4. Final simplification10.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \le -9.581789170619479121021143638585490423817 \cdot 10^{99}:\\ \;\;\;\;\mathsf{fma}\left(b, a \cdot i - z \cdot c, \left(x \cdot \sqrt[3]{\mathsf{fma}\left(t, -a, z \cdot y\right)}\right) \cdot \left(\sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)} \cdot \sqrt[3]{\mathsf{fma}\left(-a, t, z \cdot y\right)}\right)\right) + \mathsf{fma}\left(i, -y, t \cdot c\right) \cdot j\\ \mathbf{elif}\;j \le 1.656476716176859928364799179216327772733 \cdot 10^{-46}:\\ \;\;\;\;\left(\sqrt[3]{b} \cdot \left(\mathsf{fma}\left(i, a, -z \cdot c\right) \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right)\right) + x \cdot \mathsf{fma}\left(-a, t, z \cdot y\right)\right) + \left(t \cdot \left(j \cdot c\right) + \left(i \cdot j\right) \cdot \left(-y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a \cdot i - z \cdot c, \left(\sqrt[3]{x} \cdot \left(\mathsf{fma}\left(t, -a, z \cdot y\right) \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{x}\right) + \mathsf{fma}\left(i, -y, t \cdot c\right) \cdot j\\ \end{array}\]

Reproduce

herbie shell --seed 2019179 +o rules:numerics
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))