Average Error: 11.6 → 11.6
Time: 32.7s
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)\]
\[\mathsf{fma}\left(z \cdot y - t \cdot a, x, \mathsf{fma}\left(b, \frac{1}{\frac{1}{a \cdot i - c \cdot z}}, \left(c \cdot t - i \cdot y\right) \cdot j\right)\right)\]
\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)
\mathsf{fma}\left(z \cdot y - t \cdot a, x, \mathsf{fma}\left(b, \frac{1}{\frac{1}{a \cdot i - c \cdot z}}, \left(c \cdot t - i \cdot y\right) \cdot j\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r3433820 = x;
        double r3433821 = y;
        double r3433822 = z;
        double r3433823 = r3433821 * r3433822;
        double r3433824 = t;
        double r3433825 = a;
        double r3433826 = r3433824 * r3433825;
        double r3433827 = r3433823 - r3433826;
        double r3433828 = r3433820 * r3433827;
        double r3433829 = b;
        double r3433830 = c;
        double r3433831 = r3433830 * r3433822;
        double r3433832 = i;
        double r3433833 = r3433832 * r3433825;
        double r3433834 = r3433831 - r3433833;
        double r3433835 = r3433829 * r3433834;
        double r3433836 = r3433828 - r3433835;
        double r3433837 = j;
        double r3433838 = r3433830 * r3433824;
        double r3433839 = r3433832 * r3433821;
        double r3433840 = r3433838 - r3433839;
        double r3433841 = r3433837 * r3433840;
        double r3433842 = r3433836 + r3433841;
        return r3433842;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r3433843 = z;
        double r3433844 = y;
        double r3433845 = r3433843 * r3433844;
        double r3433846 = t;
        double r3433847 = a;
        double r3433848 = r3433846 * r3433847;
        double r3433849 = r3433845 - r3433848;
        double r3433850 = x;
        double r3433851 = b;
        double r3433852 = 1.0;
        double r3433853 = i;
        double r3433854 = r3433847 * r3433853;
        double r3433855 = c;
        double r3433856 = r3433855 * r3433843;
        double r3433857 = r3433854 - r3433856;
        double r3433858 = r3433852 / r3433857;
        double r3433859 = r3433852 / r3433858;
        double r3433860 = r3433855 * r3433846;
        double r3433861 = r3433853 * r3433844;
        double r3433862 = r3433860 - r3433861;
        double r3433863 = j;
        double r3433864 = r3433862 * r3433863;
        double r3433865 = fma(r3433851, r3433859, r3433864);
        double r3433866 = fma(r3433849, r3433850, r3433865);
        return r3433866;
}

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. Initial program 11.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. Simplified11.6

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

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

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

    \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, \mathsf{fma}\left(b, \frac{1}{\color{blue}{\frac{1}{i \cdot a - z \cdot c}}}, \left(t \cdot c - y \cdot i\right) \cdot j\right)\right)\]
  8. Final simplification11.6

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

Reproduce

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