Average Error: 7.3 → 1.4
Time: 3.9s
Precision: 64
\[\left(x \cdot y - z \cdot y\right) \cdot t\]
\[\begin{array}{l} \mathbf{if}\;x \cdot y - z \cdot y = -\infty \lor \neg \left(x \cdot y - z \cdot y \le 9.43843652885612725 \cdot 10^{196}\right):\\ \;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\ \end{array}\]
\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y = -\infty \lor \neg \left(x \cdot y - z \cdot y \le 9.43843652885612725 \cdot 10^{196}\right):\\
\;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\

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

\end{array}
double f(double x, double y, double z, double t) {
        double r346740 = x;
        double r346741 = y;
        double r346742 = r346740 * r346741;
        double r346743 = z;
        double r346744 = r346743 * r346741;
        double r346745 = r346742 - r346744;
        double r346746 = t;
        double r346747 = r346745 * r346746;
        return r346747;
}

double f(double x, double y, double z, double t) {
        double r346748 = x;
        double r346749 = y;
        double r346750 = r346748 * r346749;
        double r346751 = z;
        double r346752 = r346751 * r346749;
        double r346753 = r346750 - r346752;
        double r346754 = -inf.0;
        bool r346755 = r346753 <= r346754;
        double r346756 = 9.438436528856127e+196;
        bool r346757 = r346753 <= r346756;
        double r346758 = !r346757;
        bool r346759 = r346755 || r346758;
        double r346760 = t;
        double r346761 = r346760 * r346749;
        double r346762 = r346748 - r346751;
        double r346763 = r346761 * r346762;
        double r346764 = 1.0;
        double r346765 = pow(r346763, r346764);
        double r346766 = r346753 * r346760;
        double r346767 = r346759 ? r346765 : r346766;
        return r346767;
}

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.3
Target3.3
Herbie1.4
\[\begin{array}{l} \mathbf{if}\;t \lt -9.2318795828867769 \cdot 10^{-80}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(x - z\right)\\ \mathbf{elif}\;t \lt 2.5430670515648771 \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 2 regimes
  2. if (- (* x y) (* z y)) < -inf.0 or 9.438436528856127e+196 < (- (* x y) (* z y))

    1. Initial program 39.0

      \[\left(x \cdot y - z \cdot y\right) \cdot t\]
    2. Using strategy rm
    3. Applied add-cube-cbrt39.4

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

      \[\leadsto \color{blue}{\left(\sqrt[3]{x \cdot y - z \cdot y} \cdot \sqrt[3]{x \cdot y - z \cdot y}\right) \cdot \left(\sqrt[3]{x \cdot y - z \cdot y} \cdot t\right)}\]
    5. Using strategy rm
    6. Applied pow139.4

      \[\leadsto \left(\sqrt[3]{x \cdot y - z \cdot y} \cdot \sqrt[3]{x \cdot y - z \cdot y}\right) \cdot \left(\sqrt[3]{x \cdot y - z \cdot y} \cdot \color{blue}{{t}^{1}}\right)\]
    7. Applied pow139.4

      \[\leadsto \left(\sqrt[3]{x \cdot y - z \cdot y} \cdot \sqrt[3]{x \cdot y - z \cdot y}\right) \cdot \left(\color{blue}{{\left(\sqrt[3]{x \cdot y - z \cdot y}\right)}^{1}} \cdot {t}^{1}\right)\]
    8. Applied pow-prod-down39.4

      \[\leadsto \left(\sqrt[3]{x \cdot y - z \cdot y} \cdot \sqrt[3]{x \cdot y - z \cdot y}\right) \cdot \color{blue}{{\left(\sqrt[3]{x \cdot y - z \cdot y} \cdot t\right)}^{1}}\]
    9. Applied pow139.4

      \[\leadsto \left(\sqrt[3]{x \cdot y - z \cdot y} \cdot \color{blue}{{\left(\sqrt[3]{x \cdot y - z \cdot y}\right)}^{1}}\right) \cdot {\left(\sqrt[3]{x \cdot y - z \cdot y} \cdot t\right)}^{1}\]
    10. Applied pow139.4

      \[\leadsto \left(\color{blue}{{\left(\sqrt[3]{x \cdot y - z \cdot y}\right)}^{1}} \cdot {\left(\sqrt[3]{x \cdot y - z \cdot y}\right)}^{1}\right) \cdot {\left(\sqrt[3]{x \cdot y - z \cdot y} \cdot t\right)}^{1}\]
    11. Applied pow-prod-down39.4

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x \cdot y - z \cdot y} \cdot \sqrt[3]{x \cdot y - z \cdot y}\right)}^{1}} \cdot {\left(\sqrt[3]{x \cdot y - z \cdot y} \cdot t\right)}^{1}\]
    12. Applied pow-prod-down39.4

      \[\leadsto \color{blue}{{\left(\left(\sqrt[3]{x \cdot y - z \cdot y} \cdot \sqrt[3]{x \cdot y - z \cdot y}\right) \cdot \left(\sqrt[3]{x \cdot y - z \cdot y} \cdot t\right)\right)}^{1}}\]
    13. Simplified0.7

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

    if -inf.0 < (- (* x y) (* z y)) < 9.438436528856127e+196

    1. Initial program 1.5

      \[\left(x \cdot y - z \cdot y\right) \cdot t\]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y - z \cdot y = -\infty \lor \neg \left(x \cdot y - z \cdot y \le 9.43843652885612725 \cdot 10^{196}\right):\\ \;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\ \end{array}\]

Reproduce

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