Average Error: 12.2 → 12.4
Time: 23.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}\;x \le -3.496527300882801555435384929223000721941 \cdot 10^{-109} \lor \neg \left(x \le 8.257681550952632261208676529653211426737 \cdot 10^{-243}\right):\\ \;\;\;\;\left(j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - t \cdot a\right)\right) + b \cdot \left(i \cdot a - c \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - i \cdot a\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 -3.496527300882801555435384929223000721941 \cdot 10^{-109} \lor \neg \left(x \le 8.257681550952632261208676529653211426737 \cdot 10^{-243}\right):\\
\;\;\;\;\left(j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - t \cdot a\right)\right) + b \cdot \left(i \cdot a - c \cdot z\right)\\

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

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r350179 = x;
        double r350180 = y;
        double r350181 = z;
        double r350182 = r350180 * r350181;
        double r350183 = t;
        double r350184 = a;
        double r350185 = r350183 * r350184;
        double r350186 = r350182 - r350185;
        double r350187 = r350179 * r350186;
        double r350188 = b;
        double r350189 = c;
        double r350190 = r350189 * r350181;
        double r350191 = i;
        double r350192 = r350191 * r350184;
        double r350193 = r350190 - r350192;
        double r350194 = r350188 * r350193;
        double r350195 = r350187 - r350194;
        double r350196 = j;
        double r350197 = r350189 * r350183;
        double r350198 = r350191 * r350180;
        double r350199 = r350197 - r350198;
        double r350200 = r350196 * r350199;
        double r350201 = r350195 + r350200;
        return r350201;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r350202 = x;
        double r350203 = -3.4965273008828016e-109;
        bool r350204 = r350202 <= r350203;
        double r350205 = 8.257681550952632e-243;
        bool r350206 = r350202 <= r350205;
        double r350207 = !r350206;
        bool r350208 = r350204 || r350207;
        double r350209 = j;
        double r350210 = c;
        double r350211 = t;
        double r350212 = r350210 * r350211;
        double r350213 = i;
        double r350214 = y;
        double r350215 = r350213 * r350214;
        double r350216 = r350212 - r350215;
        double r350217 = r350209 * r350216;
        double r350218 = z;
        double r350219 = r350214 * r350218;
        double r350220 = a;
        double r350221 = r350211 * r350220;
        double r350222 = r350219 - r350221;
        double r350223 = r350202 * r350222;
        double r350224 = r350217 + r350223;
        double r350225 = b;
        double r350226 = r350213 * r350220;
        double r350227 = r350210 * r350218;
        double r350228 = r350226 - r350227;
        double r350229 = r350225 * r350228;
        double r350230 = r350224 + r350229;
        double r350231 = r350227 - r350226;
        double r350232 = r350225 * r350231;
        double r350233 = r350217 - r350232;
        double r350234 = r350208 ? r350230 : r350233;
        return r350234;
}

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.2
Target16.2
Herbie12.4
\[\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 < -3.4965273008828016e-109

    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 add-cube-cbrt9.9

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \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)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Applied associate-*l*9.9

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \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)}\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. Using strategy rm
    6. Applied associate-*l*9.9

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

    if -3.4965273008828016e-109 < x < 8.257681550952632e-243

    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 add-cube-cbrt17.0

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \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)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Applied associate-*l*17.0

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \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)}\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. Using strategy rm
    6. Applied sub-neg17.0

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

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

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

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

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(z \cdot \left(b \cdot c\right) + \color{blue}{\left(-b\right) \cdot \left(i \cdot a\right)}\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    11. Using strategy rm
    12. Applied associate-*r*17.4

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

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

    if 8.257681550952632e-243 < x

    1. Initial program 11.2

      \[\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-cbrt11.5

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \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)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Applied associate-*l*11.5

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \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)}\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. Using strategy rm
    6. Applied sub-neg11.5

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

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

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

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

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(z \cdot \left(b \cdot c\right) + \color{blue}{\left(-b\right) \cdot \left(i \cdot a\right)}\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    11. Using strategy rm
    12. Applied add-cube-cbrt11.9

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -3.496527300882801555435384929223000721941 \cdot 10^{-109} \lor \neg \left(x \le 8.257681550952632261208676529653211426737 \cdot 10^{-243}\right):\\ \;\;\;\;\left(j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - t \cdot a\right)\right) + b \cdot \left(i \cdot a - c \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - i \cdot a\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019298 
(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.1209789191959122e-33) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -4.7125538182184851e-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.63353334603158369e-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)))))