Average Error: 12.1 → 12.8
Time: 1.4m
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}\;x \le -4.510282121704738731660551701050045306425 \cdot 10^{-108}:\\ \;\;\;\;\left(\left(z \cdot y - t \cdot a\right) \cdot x - \sqrt[3]{c \cdot z - i \cdot a} \cdot \left(\left(\sqrt[3]{c \cdot z - i \cdot a} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right) \cdot b\right)\right) + \left(c \cdot t - i \cdot y\right) \cdot j\\ \mathbf{elif}\;x \le 4.242720942252085933366107812107450353681 \cdot 10^{-147}:\\ \;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j + \left(z \cdot \left(\left(-b\right) \cdot c\right) + a \cdot \left(b \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(z \cdot y - t \cdot a\right) \cdot x - \left(z \cdot \left(c \cdot b\right) + \left(b \cdot \left(-i\right)\right) \cdot a\right)\right) + \left(\left(-y \cdot j\right) \cdot i + j \cdot \left(c \cdot t\right)\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}\;x \le -4.510282121704738731660551701050045306425 \cdot 10^{-108}:\\
\;\;\;\;\left(\left(z \cdot y - t \cdot a\right) \cdot x - \sqrt[3]{c \cdot z - i \cdot a} \cdot \left(\left(\sqrt[3]{c \cdot z - i \cdot a} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right) \cdot b\right)\right) + \left(c \cdot t - i \cdot y\right) \cdot j\\

\mathbf{elif}\;x \le 4.242720942252085933366107812107450353681 \cdot 10^{-147}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j + \left(z \cdot \left(\left(-b\right) \cdot c\right) + a \cdot \left(b \cdot i\right)\right)\\

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

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r23643841 = x;
        double r23643842 = y;
        double r23643843 = z;
        double r23643844 = r23643842 * r23643843;
        double r23643845 = t;
        double r23643846 = a;
        double r23643847 = r23643845 * r23643846;
        double r23643848 = r23643844 - r23643847;
        double r23643849 = r23643841 * r23643848;
        double r23643850 = b;
        double r23643851 = c;
        double r23643852 = r23643851 * r23643843;
        double r23643853 = i;
        double r23643854 = r23643853 * r23643846;
        double r23643855 = r23643852 - r23643854;
        double r23643856 = r23643850 * r23643855;
        double r23643857 = r23643849 - r23643856;
        double r23643858 = j;
        double r23643859 = r23643851 * r23643845;
        double r23643860 = r23643853 * r23643842;
        double r23643861 = r23643859 - r23643860;
        double r23643862 = r23643858 * r23643861;
        double r23643863 = r23643857 + r23643862;
        return r23643863;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r23643864 = x;
        double r23643865 = -4.510282121704739e-108;
        bool r23643866 = r23643864 <= r23643865;
        double r23643867 = z;
        double r23643868 = y;
        double r23643869 = r23643867 * r23643868;
        double r23643870 = t;
        double r23643871 = a;
        double r23643872 = r23643870 * r23643871;
        double r23643873 = r23643869 - r23643872;
        double r23643874 = r23643873 * r23643864;
        double r23643875 = c;
        double r23643876 = r23643875 * r23643867;
        double r23643877 = i;
        double r23643878 = r23643877 * r23643871;
        double r23643879 = r23643876 - r23643878;
        double r23643880 = cbrt(r23643879);
        double r23643881 = r23643880 * r23643880;
        double r23643882 = b;
        double r23643883 = r23643881 * r23643882;
        double r23643884 = r23643880 * r23643883;
        double r23643885 = r23643874 - r23643884;
        double r23643886 = r23643875 * r23643870;
        double r23643887 = r23643877 * r23643868;
        double r23643888 = r23643886 - r23643887;
        double r23643889 = j;
        double r23643890 = r23643888 * r23643889;
        double r23643891 = r23643885 + r23643890;
        double r23643892 = 4.242720942252086e-147;
        bool r23643893 = r23643864 <= r23643892;
        double r23643894 = -r23643882;
        double r23643895 = r23643894 * r23643875;
        double r23643896 = r23643867 * r23643895;
        double r23643897 = r23643882 * r23643877;
        double r23643898 = r23643871 * r23643897;
        double r23643899 = r23643896 + r23643898;
        double r23643900 = r23643890 + r23643899;
        double r23643901 = r23643875 * r23643882;
        double r23643902 = r23643867 * r23643901;
        double r23643903 = -r23643877;
        double r23643904 = r23643882 * r23643903;
        double r23643905 = r23643904 * r23643871;
        double r23643906 = r23643902 + r23643905;
        double r23643907 = r23643874 - r23643906;
        double r23643908 = r23643868 * r23643889;
        double r23643909 = -r23643908;
        double r23643910 = r23643909 * r23643877;
        double r23643911 = r23643889 * r23643886;
        double r23643912 = r23643910 + r23643911;
        double r23643913 = r23643907 + r23643912;
        double r23643914 = r23643893 ? r23643900 : r23643913;
        double r23643915 = r23643866 ? r23643891 : r23643914;
        return r23643915;
}

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
Herbie12.8
\[\begin{array}{l} \mathbf{if}\;t \lt -8.12097891919591218149793027759825150959 \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 \lt -4.712553818218485141757938537793350881052 \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 \lt -7.633533346031583686060259351057142920433 \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 \lt 1.053588855745548710002760210539645467715 \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 3 regimes
  2. if x < -4.510282121704739e-108

    1. Initial program 8.1

      \[\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-cbrt8.4

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

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

    if -4.510282121704739e-108 < x < 4.242720942252086e-147

    1. Initial program 17.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. Using strategy rm
    3. Applied sub-neg17.5

      \[\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) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Applied distribute-lft-in17.5

      \[\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) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. Using strategy rm
    6. Applied associate-*r*17.3

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\color{blue}{\left(b \cdot c\right) \cdot z} + b \cdot \left(-i \cdot a\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    7. Using strategy rm
    8. Applied distribute-lft-neg-in17.3

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(b \cdot c\right) \cdot z + b \cdot \color{blue}{\left(\left(-i\right) \cdot a\right)}\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    9. Applied associate-*r*17.1

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(b \cdot c\right) \cdot z + \color{blue}{\left(b \cdot \left(-i\right)\right) \cdot a}\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    10. Taylor expanded around 0 17.8

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

    if 4.242720942252086e-147 < x

    1. Initial program 9.6

      \[\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-neg9.6

      \[\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) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Applied distribute-lft-in9.6

      \[\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) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. Using strategy rm
    6. Applied associate-*r*10.6

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\color{blue}{\left(b \cdot c\right) \cdot z} + b \cdot \left(-i \cdot a\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    7. Using strategy rm
    8. Applied distribute-lft-neg-in10.6

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(b \cdot c\right) \cdot z + b \cdot \color{blue}{\left(\left(-i\right) \cdot a\right)}\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    9. Applied associate-*r*10.6

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(b \cdot c\right) \cdot z + \color{blue}{\left(b \cdot \left(-i\right)\right) \cdot a}\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    10. Using strategy rm
    11. Applied sub-neg10.6

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(b \cdot c\right) \cdot z + \left(b \cdot \left(-i\right)\right) \cdot a\right)\right) + j \cdot \color{blue}{\left(c \cdot t + \left(-i \cdot y\right)\right)}\]
    12. Applied distribute-lft-in10.6

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -4.510282121704738731660551701050045306425 \cdot 10^{-108}:\\ \;\;\;\;\left(\left(z \cdot y - t \cdot a\right) \cdot x - \sqrt[3]{c \cdot z - i \cdot a} \cdot \left(\left(\sqrt[3]{c \cdot z - i \cdot a} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right) \cdot b\right)\right) + \left(c \cdot t - i \cdot y\right) \cdot j\\ \mathbf{elif}\;x \le 4.242720942252085933366107812107450353681 \cdot 10^{-147}:\\ \;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j + \left(z \cdot \left(\left(-b\right) \cdot c\right) + a \cdot \left(b \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(z \cdot y - t \cdot a\right) \cdot x - \left(z \cdot \left(c \cdot b\right) + \left(b \cdot \left(-i\right)\right) \cdot a\right)\right) + \left(\left(-y \cdot j\right) \cdot i + j \cdot \left(c \cdot t\right)\right)\\ \end{array}\]

Reproduce

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

  :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)))))