Average Error: 11.5 → 11.9
Time: 9.9s
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}\;b \le -7.91729124176733683 \cdot 10^{-159}:\\ \;\;\;\;\left(\left(x \cdot \mathsf{fma}\left(y, z, -a \cdot t\right) + x \cdot \mathsf{fma}\left(-a, t, a \cdot t\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(\left(\sqrt[3]{j} \cdot \sqrt[3]{c \cdot t - i \cdot y}\right) \cdot \sqrt[3]{j \cdot \left(c \cdot t - i \cdot y\right)}\right) \cdot \sqrt[3]{j \cdot \left(c \cdot t - i \cdot y\right)}\\ \mathbf{elif}\;b \le 6.71273017516703584 \cdot 10^{-117}:\\ \;\;\;\;\left(\left(x \cdot \mathsf{fma}\left(y, z, -a \cdot t\right) + x \cdot \mathsf{fma}\left(-a, t, a \cdot t\right)\right) - 0\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot \mathsf{fma}\left(y, z, -a \cdot t\right) + x \cdot \mathsf{fma}\left(-a, t, a \cdot t\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(\left(\sqrt[3]{j} \cdot \left(\sqrt[3]{\sqrt[3]{c \cdot t - i \cdot y} \cdot \sqrt[3]{c \cdot t - i \cdot y}} \cdot \sqrt[3]{\sqrt[3]{c \cdot t - i \cdot y}}\right)\right) \cdot \sqrt[3]{j \cdot \left(c \cdot t - i \cdot y\right)}\right) \cdot \sqrt[3]{j \cdot \left(c \cdot t - i \cdot y\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}\;b \le -7.91729124176733683 \cdot 10^{-159}:\\
\;\;\;\;\left(\left(x \cdot \mathsf{fma}\left(y, z, -a \cdot t\right) + x \cdot \mathsf{fma}\left(-a, t, a \cdot t\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(\left(\sqrt[3]{j} \cdot \sqrt[3]{c \cdot t - i \cdot y}\right) \cdot \sqrt[3]{j \cdot \left(c \cdot t - i \cdot y\right)}\right) \cdot \sqrt[3]{j \cdot \left(c \cdot t - i \cdot y\right)}\\

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

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

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r557444 = x;
        double r557445 = y;
        double r557446 = z;
        double r557447 = r557445 * r557446;
        double r557448 = t;
        double r557449 = a;
        double r557450 = r557448 * r557449;
        double r557451 = r557447 - r557450;
        double r557452 = r557444 * r557451;
        double r557453 = b;
        double r557454 = c;
        double r557455 = r557454 * r557446;
        double r557456 = i;
        double r557457 = r557456 * r557449;
        double r557458 = r557455 - r557457;
        double r557459 = r557453 * r557458;
        double r557460 = r557452 - r557459;
        double r557461 = j;
        double r557462 = r557454 * r557448;
        double r557463 = r557456 * r557445;
        double r557464 = r557462 - r557463;
        double r557465 = r557461 * r557464;
        double r557466 = r557460 + r557465;
        return r557466;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r557467 = b;
        double r557468 = -7.917291241767337e-159;
        bool r557469 = r557467 <= r557468;
        double r557470 = x;
        double r557471 = y;
        double r557472 = z;
        double r557473 = a;
        double r557474 = t;
        double r557475 = r557473 * r557474;
        double r557476 = -r557475;
        double r557477 = fma(r557471, r557472, r557476);
        double r557478 = r557470 * r557477;
        double r557479 = -r557473;
        double r557480 = fma(r557479, r557474, r557475);
        double r557481 = r557470 * r557480;
        double r557482 = r557478 + r557481;
        double r557483 = c;
        double r557484 = r557483 * r557472;
        double r557485 = i;
        double r557486 = r557485 * r557473;
        double r557487 = r557484 - r557486;
        double r557488 = r557467 * r557487;
        double r557489 = r557482 - r557488;
        double r557490 = j;
        double r557491 = cbrt(r557490);
        double r557492 = r557483 * r557474;
        double r557493 = r557485 * r557471;
        double r557494 = r557492 - r557493;
        double r557495 = cbrt(r557494);
        double r557496 = r557491 * r557495;
        double r557497 = r557490 * r557494;
        double r557498 = cbrt(r557497);
        double r557499 = r557496 * r557498;
        double r557500 = r557499 * r557498;
        double r557501 = r557489 + r557500;
        double r557502 = 6.712730175167036e-117;
        bool r557503 = r557467 <= r557502;
        double r557504 = 0.0;
        double r557505 = r557482 - r557504;
        double r557506 = r557505 + r557497;
        double r557507 = r557495 * r557495;
        double r557508 = cbrt(r557507);
        double r557509 = cbrt(r557495);
        double r557510 = r557508 * r557509;
        double r557511 = r557491 * r557510;
        double r557512 = r557511 * r557498;
        double r557513 = r557512 * r557498;
        double r557514 = r557489 + r557513;
        double r557515 = r557503 ? r557506 : r557514;
        double r557516 = r557469 ? r557501 : r557515;
        return r557516;
}

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

Target

Original11.5
Target15.4
Herbie11.9
\[\begin{array}{l} \mathbf{if}\;t \lt -8.1209789191959122 \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.7125538182184851 \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.63353334603158369 \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.0535888557455487 \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 b < -7.917291241767337e-159

    1. Initial program 9.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 prod-diff9.5

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

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

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

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

    if -7.917291241767337e-159 < b < 6.712730175167036e-117

    1. Initial program 16.7

      \[\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 prod-diff16.7

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

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

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

    if 6.712730175167036e-117 < b

    1. Initial program 7.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. Using strategy rm
    3. Applied prod-diff7.9

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

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

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

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

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

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

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

Reproduce

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

  :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) (pow (* i y) 2))) (+ (* 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) (pow (* i y) 2))) (+ (* 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)))))