Average Error: 12.1 → 12.5
Time: 19.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}\;a \le 3.699868882784926869688585936636538892276 \cdot 10^{116}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\sqrt[3]{x} \cdot \left(y \cdot z - t \cdot a\right)\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\ \mathbf{elif}\;a \le 3.063296828477194171347358941986932024147 \cdot 10^{269}:\\ \;\;\;\;\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(\left(\sqrt[3]{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) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\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}\;a \le 3.699868882784926869688585936636538892276 \cdot 10^{116}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\sqrt[3]{x} \cdot \left(y \cdot z - t \cdot a\right)\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\

\mathbf{elif}\;a \le 3.063296828477194171347358941986932024147 \cdot 10^{269}:\\
\;\;\;\;\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(\left(\sqrt[3]{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) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\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 r196238 = x;
        double r196239 = y;
        double r196240 = z;
        double r196241 = r196239 * r196240;
        double r196242 = t;
        double r196243 = a;
        double r196244 = r196242 * r196243;
        double r196245 = r196241 - r196244;
        double r196246 = r196238 * r196245;
        double r196247 = b;
        double r196248 = c;
        double r196249 = r196248 * r196240;
        double r196250 = i;
        double r196251 = r196250 * r196243;
        double r196252 = r196249 - r196251;
        double r196253 = r196247 * r196252;
        double r196254 = r196246 - r196253;
        double r196255 = j;
        double r196256 = r196248 * r196242;
        double r196257 = r196250 * r196239;
        double r196258 = r196256 - r196257;
        double r196259 = r196255 * r196258;
        double r196260 = r196254 + r196259;
        return r196260;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r196261 = a;
        double r196262 = 3.699868882784927e+116;
        bool r196263 = r196261 <= r196262;
        double r196264 = c;
        double r196265 = t;
        double r196266 = r196264 * r196265;
        double r196267 = i;
        double r196268 = y;
        double r196269 = r196267 * r196268;
        double r196270 = r196266 - r196269;
        double r196271 = j;
        double r196272 = x;
        double r196273 = cbrt(r196272);
        double r196274 = r196273 * r196273;
        double r196275 = z;
        double r196276 = r196268 * r196275;
        double r196277 = r196265 * r196261;
        double r196278 = r196276 - r196277;
        double r196279 = r196273 * r196278;
        double r196280 = r196274 * r196279;
        double r196281 = b;
        double r196282 = r196264 * r196275;
        double r196283 = r196267 * r196261;
        double r196284 = r196282 - r196283;
        double r196285 = r196281 * r196284;
        double r196286 = -r196261;
        double r196287 = r196261 * r196267;
        double r196288 = fma(r196286, r196267, r196287);
        double r196289 = r196281 * r196288;
        double r196290 = r196285 + r196289;
        double r196291 = r196280 - r196290;
        double r196292 = fma(r196270, r196271, r196291);
        double r196293 = 3.063296828477194e+269;
        bool r196294 = r196261 <= r196293;
        double r196295 = r196267 * r196281;
        double r196296 = r196281 * r196264;
        double r196297 = r196272 * r196265;
        double r196298 = r196261 * r196297;
        double r196299 = fma(r196275, r196296, r196298);
        double r196300 = -r196299;
        double r196301 = fma(r196261, r196295, r196300);
        double r196302 = r196272 * r196278;
        double r196303 = cbrt(r196281);
        double r196304 = r196303 * r196303;
        double r196305 = cbrt(r196284);
        double r196306 = r196305 * r196305;
        double r196307 = r196303 * r196306;
        double r196308 = r196307 * r196305;
        double r196309 = r196304 * r196308;
        double r196310 = r196309 + r196289;
        double r196311 = r196302 - r196310;
        double r196312 = fma(r196270, r196271, r196311);
        double r196313 = r196294 ? r196301 : r196312;
        double r196314 = r196263 ? r196292 : r196313;
        return r196314;
}

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 a < 3.699868882784927e+116

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

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

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

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

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

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

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

    if 3.699868882784927e+116 < a < 3.063296828477194e+269

    1. Initial program 20.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. Simplified20.5

      \[\leadsto \color{blue}{\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)}\]
    3. Taylor expanded around inf 21.4

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

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

    if 3.063296828477194e+269 < a

    1. Initial program 25.4

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(\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) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    9. Applied associate-*l*25.7

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(\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)} + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    10. Using strategy rm
    11. Applied add-cube-cbrt25.8

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(\sqrt[3]{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) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    12. Applied associate-*r*25.8

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \color{blue}{\left(\left(\sqrt[3]{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)} + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
  3. Recombined 3 regimes into one program.
  4. Final simplification12.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le 3.699868882784926869688585936636538892276 \cdot 10^{116}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\sqrt[3]{x} \cdot \left(y \cdot z - t \cdot a\right)\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\ \mathbf{elif}\;a \le 3.063296828477194171347358941986932024147 \cdot 10^{269}:\\ \;\;\;\;\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(\left(\sqrt[3]{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) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\ \end{array}\]

Reproduce

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