Average Error: 12.0 → 11.4
Time: 33.0s
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 -1.692024971176755004489730368276965172524 \cdot 10^{-283}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, x \cdot \left(y \cdot z - t \cdot a\right)\right)\right)\\ \mathbf{elif}\;x \le 2.083531344283219068569904816479604169105 \cdot 10^{-145}:\\ \;\;\;\;\left(i \cdot \left(a \cdot b\right) - \mathsf{fma}\left(a, t \cdot x, \left(c \cdot z\right) \cdot b\right)\right) + j \cdot \left(t \cdot c - y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, x \cdot \left(y \cdot z - t \cdot a\right)\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 -1.692024971176755004489730368276965172524 \cdot 10^{-283}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, x \cdot \left(y \cdot z - t \cdot a\right)\right)\right)\\

\mathbf{elif}\;x \le 2.083531344283219068569904816479604169105 \cdot 10^{-145}:\\
\;\;\;\;\left(i \cdot \left(a \cdot b\right) - \mathsf{fma}\left(a, t \cdot x, \left(c \cdot z\right) \cdot b\right)\right) + j \cdot \left(t \cdot c - y \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, x \cdot \left(y \cdot z - t \cdot a\right)\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 r3626952 = x;
        double r3626953 = y;
        double r3626954 = z;
        double r3626955 = r3626953 * r3626954;
        double r3626956 = t;
        double r3626957 = a;
        double r3626958 = r3626956 * r3626957;
        double r3626959 = r3626955 - r3626958;
        double r3626960 = r3626952 * r3626959;
        double r3626961 = b;
        double r3626962 = c;
        double r3626963 = r3626962 * r3626954;
        double r3626964 = i;
        double r3626965 = r3626964 * r3626957;
        double r3626966 = r3626963 - r3626965;
        double r3626967 = r3626961 * r3626966;
        double r3626968 = r3626960 - r3626967;
        double r3626969 = j;
        double r3626970 = r3626962 * r3626956;
        double r3626971 = r3626964 * r3626953;
        double r3626972 = r3626970 - r3626971;
        double r3626973 = r3626969 * r3626972;
        double r3626974 = r3626968 + r3626973;
        return r3626974;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r3626975 = x;
        double r3626976 = -1.692024971176755e-283;
        bool r3626977 = r3626975 <= r3626976;
        double r3626978 = t;
        double r3626979 = c;
        double r3626980 = r3626978 * r3626979;
        double r3626981 = y;
        double r3626982 = i;
        double r3626983 = r3626981 * r3626982;
        double r3626984 = r3626980 - r3626983;
        double r3626985 = j;
        double r3626986 = a;
        double r3626987 = r3626986 * r3626982;
        double r3626988 = z;
        double r3626989 = r3626979 * r3626988;
        double r3626990 = r3626987 - r3626989;
        double r3626991 = b;
        double r3626992 = r3626981 * r3626988;
        double r3626993 = r3626978 * r3626986;
        double r3626994 = r3626992 - r3626993;
        double r3626995 = r3626975 * r3626994;
        double r3626996 = fma(r3626990, r3626991, r3626995);
        double r3626997 = fma(r3626984, r3626985, r3626996);
        double r3626998 = 2.083531344283219e-145;
        bool r3626999 = r3626975 <= r3626998;
        double r3627000 = r3626986 * r3626991;
        double r3627001 = r3626982 * r3627000;
        double r3627002 = r3626978 * r3626975;
        double r3627003 = r3626989 * r3626991;
        double r3627004 = fma(r3626986, r3627002, r3627003);
        double r3627005 = r3627001 - r3627004;
        double r3627006 = r3626985 * r3626984;
        double r3627007 = r3627005 + r3627006;
        double r3627008 = r3626999 ? r3627007 : r3626997;
        double r3627009 = r3626977 ? r3626997 : r3627008;
        return r3627009;
}

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 2 regimes
  2. if x < -1.692024971176755e-283 or 2.083531344283219e-145 < x

    1. Initial program 10.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. Simplified10.9

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

    if -1.692024971176755e-283 < x < 2.083531344283219e-145

    1. Initial program 16.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. Taylor expanded around inf 11.9

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -1.692024971176755004489730368276965172524 \cdot 10^{-283}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, x \cdot \left(y \cdot z - t \cdot a\right)\right)\right)\\ \mathbf{elif}\;x \le 2.083531344283219068569904816479604169105 \cdot 10^{-145}:\\ \;\;\;\;\left(i \cdot \left(a \cdot b\right) - \mathsf{fma}\left(a, t \cdot x, \left(c \cdot z\right) \cdot b\right)\right) + j \cdot \left(t \cdot c - y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, x \cdot \left(y \cdot z - t \cdot a\right)\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019169 +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)))))