Average Error: 5.7 → 4.3
Time: 33.5s
Precision: 64
\[\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k\]
\[\begin{array}{l} \mathbf{if}\;t \le -9.815254673950543 \cdot 10^{-140}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(x \cdot 18.0\right) \cdot z\right) \cdot y - a \cdot 4.0, t, b \cdot c - \mathsf{fma}\left(4.0 \cdot i, x, \left(\sqrt{27.0} \cdot \left(k \cdot j\right)\right) \cdot \sqrt{27.0}\right)\right)\\ \mathbf{elif}\;t \le 1.2057811127525296 \cdot 10^{-172}:\\ \;\;\;\;\mathsf{fma}\left(\left(-4.0\right) \cdot a, t, b \cdot c - \mathsf{fma}\left(4.0 \cdot i, x, \left(k \cdot j\right) \cdot 27.0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot \left(\left(\sqrt[3]{\left(x \cdot 18.0\right) \cdot z} \cdot \sqrt[3]{\left(x \cdot 18.0\right) \cdot z}\right) \cdot \sqrt[3]{\left(x \cdot 18.0\right) \cdot z}\right) - a \cdot 4.0, t, b \cdot c - \mathsf{fma}\left(4.0 \cdot i, x, \left(27.0 \cdot j\right) \cdot k\right)\right)\\ \end{array}\]
\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k
\begin{array}{l}
\mathbf{if}\;t \le -9.815254673950543 \cdot 10^{-140}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(x \cdot 18.0\right) \cdot z\right) \cdot y - a \cdot 4.0, t, b \cdot c - \mathsf{fma}\left(4.0 \cdot i, x, \left(\sqrt{27.0} \cdot \left(k \cdot j\right)\right) \cdot \sqrt{27.0}\right)\right)\\

\mathbf{elif}\;t \le 1.2057811127525296 \cdot 10^{-172}:\\
\;\;\;\;\mathsf{fma}\left(\left(-4.0\right) \cdot a, t, b \cdot c - \mathsf{fma}\left(4.0 \cdot i, x, \left(k \cdot j\right) \cdot 27.0\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot \left(\left(\sqrt[3]{\left(x \cdot 18.0\right) \cdot z} \cdot \sqrt[3]{\left(x \cdot 18.0\right) \cdot z}\right) \cdot \sqrt[3]{\left(x \cdot 18.0\right) \cdot z}\right) - a \cdot 4.0, t, b \cdot c - \mathsf{fma}\left(4.0 \cdot i, x, \left(27.0 \cdot j\right) \cdot k\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 k) {
        double r2062603 = x;
        double r2062604 = 18.0;
        double r2062605 = r2062603 * r2062604;
        double r2062606 = y;
        double r2062607 = r2062605 * r2062606;
        double r2062608 = z;
        double r2062609 = r2062607 * r2062608;
        double r2062610 = t;
        double r2062611 = r2062609 * r2062610;
        double r2062612 = a;
        double r2062613 = 4.0;
        double r2062614 = r2062612 * r2062613;
        double r2062615 = r2062614 * r2062610;
        double r2062616 = r2062611 - r2062615;
        double r2062617 = b;
        double r2062618 = c;
        double r2062619 = r2062617 * r2062618;
        double r2062620 = r2062616 + r2062619;
        double r2062621 = r2062603 * r2062613;
        double r2062622 = i;
        double r2062623 = r2062621 * r2062622;
        double r2062624 = r2062620 - r2062623;
        double r2062625 = j;
        double r2062626 = 27.0;
        double r2062627 = r2062625 * r2062626;
        double r2062628 = k;
        double r2062629 = r2062627 * r2062628;
        double r2062630 = r2062624 - r2062629;
        return r2062630;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
        double r2062631 = t;
        double r2062632 = -9.815254673950543e-140;
        bool r2062633 = r2062631 <= r2062632;
        double r2062634 = x;
        double r2062635 = 18.0;
        double r2062636 = r2062634 * r2062635;
        double r2062637 = z;
        double r2062638 = r2062636 * r2062637;
        double r2062639 = y;
        double r2062640 = r2062638 * r2062639;
        double r2062641 = a;
        double r2062642 = 4.0;
        double r2062643 = r2062641 * r2062642;
        double r2062644 = r2062640 - r2062643;
        double r2062645 = b;
        double r2062646 = c;
        double r2062647 = r2062645 * r2062646;
        double r2062648 = i;
        double r2062649 = r2062642 * r2062648;
        double r2062650 = 27.0;
        double r2062651 = sqrt(r2062650);
        double r2062652 = k;
        double r2062653 = j;
        double r2062654 = r2062652 * r2062653;
        double r2062655 = r2062651 * r2062654;
        double r2062656 = r2062655 * r2062651;
        double r2062657 = fma(r2062649, r2062634, r2062656);
        double r2062658 = r2062647 - r2062657;
        double r2062659 = fma(r2062644, r2062631, r2062658);
        double r2062660 = 1.2057811127525296e-172;
        bool r2062661 = r2062631 <= r2062660;
        double r2062662 = -r2062642;
        double r2062663 = r2062662 * r2062641;
        double r2062664 = r2062654 * r2062650;
        double r2062665 = fma(r2062649, r2062634, r2062664);
        double r2062666 = r2062647 - r2062665;
        double r2062667 = fma(r2062663, r2062631, r2062666);
        double r2062668 = cbrt(r2062638);
        double r2062669 = r2062668 * r2062668;
        double r2062670 = r2062669 * r2062668;
        double r2062671 = r2062639 * r2062670;
        double r2062672 = r2062671 - r2062643;
        double r2062673 = r2062650 * r2062653;
        double r2062674 = r2062673 * r2062652;
        double r2062675 = fma(r2062649, r2062634, r2062674);
        double r2062676 = r2062647 - r2062675;
        double r2062677 = fma(r2062672, r2062631, r2062676);
        double r2062678 = r2062661 ? r2062667 : r2062677;
        double r2062679 = r2062633 ? r2062659 : r2062678;
        return r2062679;
}

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

Bits error versus k

Derivation

  1. Split input into 3 regimes
  2. if t < -9.815254673950543e-140

    1. Initial program 4.2

      \[\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k\]
    2. Simplified4.4

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y \cdot z\right) \cdot \left(x \cdot 18.0\right) - a \cdot 4.0, t, c \cdot b - \mathsf{fma}\left(27.0, k \cdot j, \left(x \cdot 4.0\right) \cdot i\right)\right)}\]
    3. Using strategy rm
    4. Applied associate-*l*3.5

      \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot \left(z \cdot \left(x \cdot 18.0\right)\right)} - a \cdot 4.0, t, c \cdot b - \mathsf{fma}\left(27.0, k \cdot j, \left(x \cdot 4.0\right) \cdot i\right)\right)\]
    5. Taylor expanded around inf 3.5

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

      \[\leadsto \mathsf{fma}\left(y \cdot \left(z \cdot \left(x \cdot 18.0\right)\right) - a \cdot 4.0, t, c \cdot b - \color{blue}{\mathsf{fma}\left(i \cdot 4.0, x, \left(k \cdot j\right) \cdot 27.0\right)}\right)\]
    7. Using strategy rm
    8. Applied add-sqr-sqrt3.6

      \[\leadsto \mathsf{fma}\left(y \cdot \left(z \cdot \left(x \cdot 18.0\right)\right) - a \cdot 4.0, t, c \cdot b - \mathsf{fma}\left(i \cdot 4.0, x, \left(k \cdot j\right) \cdot \color{blue}{\left(\sqrt{27.0} \cdot \sqrt{27.0}\right)}\right)\right)\]
    9. Applied associate-*r*3.6

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

    if -9.815254673950543e-140 < t < 1.2057811127525296e-172

    1. Initial program 9.1

      \[\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k\]
    2. Simplified9.6

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y \cdot z\right) \cdot \left(x \cdot 18.0\right) - a \cdot 4.0, t, c \cdot b - \mathsf{fma}\left(27.0, k \cdot j, \left(x \cdot 4.0\right) \cdot i\right)\right)}\]
    3. Using strategy rm
    4. Applied associate-*l*8.4

      \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot \left(z \cdot \left(x \cdot 18.0\right)\right)} - a \cdot 4.0, t, c \cdot b - \mathsf{fma}\left(27.0, k \cdot j, \left(x \cdot 4.0\right) \cdot i\right)\right)\]
    5. Taylor expanded around inf 8.4

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

      \[\leadsto \mathsf{fma}\left(y \cdot \left(z \cdot \left(x \cdot 18.0\right)\right) - a \cdot 4.0, t, c \cdot b - \color{blue}{\mathsf{fma}\left(i \cdot 4.0, x, \left(k \cdot j\right) \cdot 27.0\right)}\right)\]
    7. Taylor expanded around 0 5.9

      \[\leadsto \mathsf{fma}\left(\color{blue}{0} - a \cdot 4.0, t, c \cdot b - \mathsf{fma}\left(i \cdot 4.0, x, \left(k \cdot j\right) \cdot 27.0\right)\right)\]

    if 1.2057811127525296e-172 < t

    1. Initial program 4.0

      \[\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k\]
    2. Simplified3.5

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y \cdot z\right) \cdot \left(x \cdot 18.0\right) - a \cdot 4.0, t, c \cdot b - \mathsf{fma}\left(27.0, k \cdot j, \left(x \cdot 4.0\right) \cdot i\right)\right)}\]
    3. Using strategy rm
    4. Applied associate-*l*3.2

      \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot \left(z \cdot \left(x \cdot 18.0\right)\right)} - a \cdot 4.0, t, c \cdot b - \mathsf{fma}\left(27.0, k \cdot j, \left(x \cdot 4.0\right) \cdot i\right)\right)\]
    5. Taylor expanded around inf 3.2

      \[\leadsto \mathsf{fma}\left(y \cdot \left(z \cdot \left(x \cdot 18.0\right)\right) - a \cdot 4.0, t, c \cdot b - \color{blue}{\left(27.0 \cdot \left(j \cdot k\right) + 4.0 \cdot \left(i \cdot x\right)\right)}\right)\]
    6. Simplified3.3

      \[\leadsto \mathsf{fma}\left(y \cdot \left(z \cdot \left(x \cdot 18.0\right)\right) - a \cdot 4.0, t, c \cdot b - \color{blue}{\mathsf{fma}\left(i \cdot 4.0, x, \left(k \cdot j\right) \cdot 27.0\right)}\right)\]
    7. Using strategy rm
    8. Applied associate-*l*3.3

      \[\leadsto \mathsf{fma}\left(y \cdot \left(z \cdot \left(x \cdot 18.0\right)\right) - a \cdot 4.0, t, c \cdot b - \mathsf{fma}\left(i \cdot 4.0, x, \color{blue}{k \cdot \left(j \cdot 27.0\right)}\right)\right)\]
    9. Using strategy rm
    10. Applied add-cube-cbrt3.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -9.815254673950543 \cdot 10^{-140}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(x \cdot 18.0\right) \cdot z\right) \cdot y - a \cdot 4.0, t, b \cdot c - \mathsf{fma}\left(4.0 \cdot i, x, \left(\sqrt{27.0} \cdot \left(k \cdot j\right)\right) \cdot \sqrt{27.0}\right)\right)\\ \mathbf{elif}\;t \le 1.2057811127525296 \cdot 10^{-172}:\\ \;\;\;\;\mathsf{fma}\left(\left(-4.0\right) \cdot a, t, b \cdot c - \mathsf{fma}\left(4.0 \cdot i, x, \left(k \cdot j\right) \cdot 27.0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot \left(\left(\sqrt[3]{\left(x \cdot 18.0\right) \cdot z} \cdot \sqrt[3]{\left(x \cdot 18.0\right) \cdot z}\right) \cdot \sqrt[3]{\left(x \cdot 18.0\right) \cdot z}\right) - a \cdot 4.0, t, b \cdot c - \mathsf{fma}\left(4.0 \cdot i, x, \left(27.0 \cdot j\right) \cdot k\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019156 +o rules:numerics
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1"
  (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))