Average Error: 12.3 → 12.3
Time: 20.1s
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)\]
\[\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)\]
\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)
\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)
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r376252 = x;
        double r376253 = y;
        double r376254 = z;
        double r376255 = r376253 * r376254;
        double r376256 = t;
        double r376257 = a;
        double r376258 = r376256 * r376257;
        double r376259 = r376255 - r376258;
        double r376260 = r376252 * r376259;
        double r376261 = b;
        double r376262 = c;
        double r376263 = r376262 * r376254;
        double r376264 = i;
        double r376265 = r376264 * r376257;
        double r376266 = r376263 - r376265;
        double r376267 = r376261 * r376266;
        double r376268 = r376260 - r376267;
        double r376269 = j;
        double r376270 = r376262 * r376256;
        double r376271 = r376264 * r376253;
        double r376272 = r376270 - r376271;
        double r376273 = r376269 * r376272;
        double r376274 = r376268 + r376273;
        return r376274;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r376275 = x;
        double r376276 = y;
        double r376277 = z;
        double r376278 = r376276 * r376277;
        double r376279 = t;
        double r376280 = a;
        double r376281 = r376279 * r376280;
        double r376282 = r376278 - r376281;
        double r376283 = r376275 * r376282;
        double r376284 = b;
        double r376285 = c;
        double r376286 = r376285 * r376277;
        double r376287 = i;
        double r376288 = r376287 * r376280;
        double r376289 = r376286 - r376288;
        double r376290 = r376284 * r376289;
        double r376291 = r376283 - r376290;
        double r376292 = j;
        double r376293 = r376285 * r376279;
        double r376294 = r376287 * r376276;
        double r376295 = r376293 - r376294;
        double r376296 = r376292 * r376295;
        double r376297 = r376291 + r376296;
        return r376297;
}

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.3
Target16.3
Herbie12.3
\[\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 4 regimes
  2. if z < -9.210072683042902e+197 or 112.17173264432692 < z

    1. Initial program 19.0

      \[\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 sub-neg19.0

      \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot z + \left(-t \cdot a\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-in19.0

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

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

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

    if -9.210072683042902e+197 < z < -2.363984397184064e-225

    1. Initial program 11.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. Using strategy rm
    3. Applied sub-neg11.3

      \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot z + \left(-t \cdot a\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-in11.3

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

      \[\leadsto \left(\left(x \cdot \left(y \cdot z\right) + \color{blue}{\left(-x \cdot t\right) \cdot a}\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    6. Using strategy rm
    7. Applied sub-neg11.6

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

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

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

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

    if -2.363984397184064e-225 < z < 1.2726446353115491e-186

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

      \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot z + \left(-t \cdot a\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.3

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

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

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

    if 1.2726446353115491e-186 < z < 112.17173264432692

    1. Initial program 8.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 sub-neg8.5

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

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

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

    \[\leadsto \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)\]

Reproduce

herbie shell --seed 2019291 
(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)))))