Average Error: 5.1 → 4.4
Time: 29.1s
Precision: 64
\[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\]
\[\begin{array}{l} \mathbf{if}\;t \le 5.612796806482376315037030586204465630066 \cdot 10^{68}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \left(\left(x \cdot 18\right) \cdot y\right) \cdot \left(z \cdot t\right)\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), 27 \cdot \left(k \cdot j\right)\right)\\ \end{array}\]
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\begin{array}{l}
\mathbf{if}\;t \le 5.612796806482376315037030586204465630066 \cdot 10^{68}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \left(\left(x \cdot 18\right) \cdot y\right) \cdot \left(z \cdot t\right)\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), 27 \cdot \left(k \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), 27 \cdot \left(k \cdot j\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 r93591 = x;
        double r93592 = 18.0;
        double r93593 = r93591 * r93592;
        double r93594 = y;
        double r93595 = r93593 * r93594;
        double r93596 = z;
        double r93597 = r93595 * r93596;
        double r93598 = t;
        double r93599 = r93597 * r93598;
        double r93600 = a;
        double r93601 = 4.0;
        double r93602 = r93600 * r93601;
        double r93603 = r93602 * r93598;
        double r93604 = r93599 - r93603;
        double r93605 = b;
        double r93606 = c;
        double r93607 = r93605 * r93606;
        double r93608 = r93604 + r93607;
        double r93609 = r93591 * r93601;
        double r93610 = i;
        double r93611 = r93609 * r93610;
        double r93612 = r93608 - r93611;
        double r93613 = j;
        double r93614 = 27.0;
        double r93615 = r93613 * r93614;
        double r93616 = k;
        double r93617 = r93615 * r93616;
        double r93618 = r93612 - r93617;
        return r93618;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
        double r93619 = t;
        double r93620 = 5.612796806482376e+68;
        bool r93621 = r93619 <= r93620;
        double r93622 = c;
        double r93623 = b;
        double r93624 = x;
        double r93625 = 18.0;
        double r93626 = r93624 * r93625;
        double r93627 = y;
        double r93628 = r93626 * r93627;
        double r93629 = z;
        double r93630 = r93629 * r93619;
        double r93631 = r93628 * r93630;
        double r93632 = fma(r93622, r93623, r93631);
        double r93633 = 4.0;
        double r93634 = a;
        double r93635 = i;
        double r93636 = r93624 * r93635;
        double r93637 = fma(r93619, r93634, r93636);
        double r93638 = 27.0;
        double r93639 = k;
        double r93640 = j;
        double r93641 = r93639 * r93640;
        double r93642 = r93638 * r93641;
        double r93643 = fma(r93633, r93637, r93642);
        double r93644 = r93632 - r93643;
        double r93645 = r93627 * r93629;
        double r93646 = r93626 * r93645;
        double r93647 = r93646 * r93619;
        double r93648 = fma(r93622, r93623, r93647);
        double r93649 = r93648 - r93643;
        double r93650 = r93621 ? r93644 : r93649;
        return r93650;
}

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 2 regimes
  2. if t < 5.612796806482376e+68

    1. Initial program 5.6

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\]
    2. Simplified5.6

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

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), \left(j \cdot 27\right) \cdot \color{blue}{{k}^{1}}\right)\]
    5. Applied pow15.6

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), \left(j \cdot \color{blue}{{27}^{1}}\right) \cdot {k}^{1}\right)\]
    6. Applied pow15.6

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), \left(\color{blue}{{j}^{1}} \cdot {27}^{1}\right) \cdot {k}^{1}\right)\]
    7. Applied pow-prod-down5.6

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), \color{blue}{{\left(j \cdot 27\right)}^{1}} \cdot {k}^{1}\right)\]
    8. Applied pow-prod-down5.6

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), \color{blue}{{\left(\left(j \cdot 27\right) \cdot k\right)}^{1}}\right)\]
    9. Simplified5.6

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\color{blue}{\left(j \cdot \left(27 \cdot k\right)\right)}}^{1}\right)\]
    10. Using strategy rm
    11. Applied pow15.6

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\left(j \cdot \left(27 \cdot \color{blue}{{k}^{1}}\right)\right)}^{1}\right)\]
    12. Applied pow15.6

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\left(j \cdot \left(\color{blue}{{27}^{1}} \cdot {k}^{1}\right)\right)}^{1}\right)\]
    13. Applied pow-prod-down5.6

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\left(j \cdot \color{blue}{{\left(27 \cdot k\right)}^{1}}\right)}^{1}\right)\]
    14. Applied pow15.6

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\left(\color{blue}{{j}^{1}} \cdot {\left(27 \cdot k\right)}^{1}\right)}^{1}\right)\]
    15. Applied pow-prod-down5.6

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\color{blue}{\left({\left(j \cdot \left(27 \cdot k\right)\right)}^{1}\right)}}^{1}\right)\]
    16. Simplified5.5

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\left({\color{blue}{\left(27 \cdot \left(k \cdot j\right)\right)}}^{1}\right)}^{1}\right)\]
    17. Using strategy rm
    18. Applied associate-*l*4.8

      \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot \left(z \cdot t\right)}\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\left({\left(27 \cdot \left(k \cdot j\right)\right)}^{1}\right)}^{1}\right)\]

    if 5.612796806482376e+68 < t

    1. Initial program 1.4

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\]
    2. Simplified1.4

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

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), \left(j \cdot 27\right) \cdot \color{blue}{{k}^{1}}\right)\]
    5. Applied pow11.4

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), \left(j \cdot \color{blue}{{27}^{1}}\right) \cdot {k}^{1}\right)\]
    6. Applied pow11.4

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), \left(\color{blue}{{j}^{1}} \cdot {27}^{1}\right) \cdot {k}^{1}\right)\]
    7. Applied pow-prod-down1.4

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), \color{blue}{{\left(j \cdot 27\right)}^{1}} \cdot {k}^{1}\right)\]
    8. Applied pow-prod-down1.4

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), \color{blue}{{\left(\left(j \cdot 27\right) \cdot k\right)}^{1}}\right)\]
    9. Simplified1.3

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\color{blue}{\left(j \cdot \left(27 \cdot k\right)\right)}}^{1}\right)\]
    10. Using strategy rm
    11. Applied pow11.3

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\left(j \cdot \left(27 \cdot \color{blue}{{k}^{1}}\right)\right)}^{1}\right)\]
    12. Applied pow11.3

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\left(j \cdot \left(\color{blue}{{27}^{1}} \cdot {k}^{1}\right)\right)}^{1}\right)\]
    13. Applied pow-prod-down1.3

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\left(j \cdot \color{blue}{{\left(27 \cdot k\right)}^{1}}\right)}^{1}\right)\]
    14. Applied pow11.3

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\left(\color{blue}{{j}^{1}} \cdot {\left(27 \cdot k\right)}^{1}\right)}^{1}\right)\]
    15. Applied pow-prod-down1.3

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\color{blue}{\left({\left(j \cdot \left(27 \cdot k\right)\right)}^{1}\right)}}^{1}\right)\]
    16. Simplified1.2

      \[\leadsto \mathsf{fma}\left(c, b, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), {\left({\color{blue}{\left(27 \cdot \left(k \cdot j\right)\right)}}^{1}\right)}^{1}\right)\]
    17. Using strategy rm
    18. Applied associate-*l*1.6

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le 5.612796806482376315037030586204465630066 \cdot 10^{68}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \left(\left(x \cdot 18\right) \cdot y\right) \cdot \left(z \cdot t\right)\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right) \cdot t\right) - \mathsf{fma}\left(4, \mathsf{fma}\left(t, a, x \cdot i\right), 27 \cdot \left(k \cdot j\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019209 +o rules:numerics
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1"
  :precision binary64
  (- (- (+ (- (* (* (* (* x 18) y) z) t) (* (* a 4) t)) (* b c)) (* (* x 4) i)) (* (* j 27) k)))