Average Error: 7.4 → 3.3
Time: 16.3s
Precision: 64
\[\left(x \cdot y - z \cdot y\right) \cdot t\]
\[\begin{array}{l} \mathbf{if}\;t \le -2.67266543104995666758061087259893237368 \cdot 10^{-104}:\\ \;\;\;\;\left(x \cdot y + \left(-z\right) \cdot y\right) \cdot t\\ \mathbf{elif}\;t \le 1.446746301620560300419515762159021133469 \cdot 10^{56}:\\ \;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)} \cdot \sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)}\right) \cdot \left(\sqrt[3]{t \cdot y} \cdot \sqrt[3]{x - z}\right)\\ \end{array}\]
\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;t \le -2.67266543104995666758061087259893237368 \cdot 10^{-104}:\\
\;\;\;\;\left(x \cdot y + \left(-z\right) \cdot y\right) \cdot t\\

\mathbf{elif}\;t \le 1.446746301620560300419515762159021133469 \cdot 10^{56}:\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)} \cdot \sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)}\right) \cdot \left(\sqrt[3]{t \cdot y} \cdot \sqrt[3]{x - z}\right)\\

\end{array}
double f(double x, double y, double z, double t) {
        double r361766 = x;
        double r361767 = y;
        double r361768 = r361766 * r361767;
        double r361769 = z;
        double r361770 = r361769 * r361767;
        double r361771 = r361768 - r361770;
        double r361772 = t;
        double r361773 = r361771 * r361772;
        return r361773;
}

double f(double x, double y, double z, double t) {
        double r361774 = t;
        double r361775 = -2.6726654310499567e-104;
        bool r361776 = r361774 <= r361775;
        double r361777 = x;
        double r361778 = y;
        double r361779 = r361777 * r361778;
        double r361780 = z;
        double r361781 = -r361780;
        double r361782 = r361781 * r361778;
        double r361783 = r361779 + r361782;
        double r361784 = r361783 * r361774;
        double r361785 = 1.4467463016205603e+56;
        bool r361786 = r361774 <= r361785;
        double r361787 = r361777 - r361780;
        double r361788 = r361774 * r361787;
        double r361789 = r361778 * r361788;
        double r361790 = r361774 * r361778;
        double r361791 = r361790 * r361787;
        double r361792 = cbrt(r361791);
        double r361793 = r361792 * r361792;
        double r361794 = cbrt(r361790);
        double r361795 = cbrt(r361787);
        double r361796 = r361794 * r361795;
        double r361797 = r361793 * r361796;
        double r361798 = r361786 ? r361789 : r361797;
        double r361799 = r361776 ? r361784 : r361798;
        return r361799;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original7.4
Target3.1
Herbie3.3
\[\begin{array}{l} \mathbf{if}\;t \lt -9.231879582886776938073886590448747944753 \cdot 10^{-80}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(x - z\right)\\ \mathbf{elif}\;t \lt 2.543067051564877116200336808272775217995 \cdot 10^{83}:\\ \;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot \left(x - z\right)\right) \cdot t\\ \end{array}\]

Derivation

  1. Split input into 3 regimes
  2. if t < -2.6726654310499567e-104

    1. Initial program 4.0

      \[\left(x \cdot y - z \cdot y\right) \cdot t\]
    2. Using strategy rm
    3. Applied sub-neg4.0

      \[\leadsto \color{blue}{\left(x \cdot y + \left(-z \cdot y\right)\right)} \cdot t\]
    4. Simplified4.0

      \[\leadsto \left(x \cdot y + \color{blue}{\left(-z\right) \cdot y}\right) \cdot t\]

    if -2.6726654310499567e-104 < t < 1.4467463016205603e+56

    1. Initial program 9.9

      \[\left(x \cdot y - z \cdot y\right) \cdot t\]
    2. Using strategy rm
    3. Applied distribute-rgt-out--9.9

      \[\leadsto \color{blue}{\left(y \cdot \left(x - z\right)\right)} \cdot t\]
    4. Applied associate-*l*2.6

      \[\leadsto \color{blue}{y \cdot \left(\left(x - z\right) \cdot t\right)}\]
    5. Simplified2.6

      \[\leadsto y \cdot \color{blue}{\left(t \cdot \left(x - z\right)\right)}\]

    if 1.4467463016205603e+56 < t

    1. Initial program 4.2

      \[\left(x \cdot y - z \cdot y\right) \cdot t\]
    2. Using strategy rm
    3. Applied sub-neg4.2

      \[\leadsto \color{blue}{\left(x \cdot y + \left(-z \cdot y\right)\right)} \cdot t\]
    4. Simplified4.2

      \[\leadsto \left(x \cdot y + \color{blue}{\left(-z\right) \cdot y}\right) \cdot t\]
    5. Using strategy rm
    6. Applied add-cube-cbrt5.2

      \[\leadsto \color{blue}{\left(\left(\sqrt[3]{x \cdot y + \left(-z\right) \cdot y} \cdot \sqrt[3]{x \cdot y + \left(-z\right) \cdot y}\right) \cdot \sqrt[3]{x \cdot y + \left(-z\right) \cdot y}\right)} \cdot t\]
    7. Applied associate-*l*5.2

      \[\leadsto \color{blue}{\left(\sqrt[3]{x \cdot y + \left(-z\right) \cdot y} \cdot \sqrt[3]{x \cdot y + \left(-z\right) \cdot y}\right) \cdot \left(\sqrt[3]{x \cdot y + \left(-z\right) \cdot y} \cdot t\right)}\]
    8. Simplified5.2

      \[\leadsto \left(\sqrt[3]{x \cdot y + \left(-z\right) \cdot y} \cdot \sqrt[3]{x \cdot y + \left(-z\right) \cdot y}\right) \cdot \color{blue}{\left(t \cdot \sqrt[3]{y \cdot \left(x - z\right)}\right)}\]
    9. Using strategy rm
    10. Applied add-cube-cbrt5.5

      \[\leadsto \color{blue}{\left(\sqrt[3]{\left(\sqrt[3]{x \cdot y + \left(-z\right) \cdot y} \cdot \sqrt[3]{x \cdot y + \left(-z\right) \cdot y}\right) \cdot \left(t \cdot \sqrt[3]{y \cdot \left(x - z\right)}\right)} \cdot \sqrt[3]{\left(\sqrt[3]{x \cdot y + \left(-z\right) \cdot y} \cdot \sqrt[3]{x \cdot y + \left(-z\right) \cdot y}\right) \cdot \left(t \cdot \sqrt[3]{y \cdot \left(x - z\right)}\right)}\right) \cdot \sqrt[3]{\left(\sqrt[3]{x \cdot y + \left(-z\right) \cdot y} \cdot \sqrt[3]{x \cdot y + \left(-z\right) \cdot y}\right) \cdot \left(t \cdot \sqrt[3]{y \cdot \left(x - z\right)}\right)}}\]
    11. Simplified8.6

      \[\leadsto \color{blue}{\left(\sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)} \cdot \sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)}\right)} \cdot \sqrt[3]{\left(\sqrt[3]{x \cdot y + \left(-z\right) \cdot y} \cdot \sqrt[3]{x \cdot y + \left(-z\right) \cdot y}\right) \cdot \left(t \cdot \sqrt[3]{y \cdot \left(x - z\right)}\right)}\]
    12. Simplified4.9

      \[\leadsto \left(\sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)} \cdot \sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)}\right) \cdot \color{blue}{\sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)}}\]
    13. Using strategy rm
    14. Applied cbrt-prod4.7

      \[\leadsto \left(\sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)} \cdot \sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)}\right) \cdot \color{blue}{\left(\sqrt[3]{t \cdot y} \cdot \sqrt[3]{x - z}\right)}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification3.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.67266543104995666758061087259893237368 \cdot 10^{-104}:\\ \;\;\;\;\left(x \cdot y + \left(-z\right) \cdot y\right) \cdot t\\ \mathbf{elif}\;t \le 1.446746301620560300419515762159021133469 \cdot 10^{56}:\\ \;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)} \cdot \sqrt[3]{\left(t \cdot y\right) \cdot \left(x - z\right)}\right) \cdot \left(\sqrt[3]{t \cdot y} \cdot \sqrt[3]{x - z}\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019325 +o rules:numerics
(FPCore (x y z t)
  :name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (if (< t -9.231879582886777e-80) (* (* y t) (- x z)) (if (< t 2.543067051564877e+83) (* y (* t (- x z))) (* (* y (- x z)) t)))

  (* (- (* x y) (* z y)) t))