Average Error: 7.2 → 1.7
Time: 5.5s
Precision: 64
\[\left(x \cdot y - z \cdot y\right) \cdot t\]
\[\begin{array}{l} \mathbf{if}\;\left(x \cdot y - z \cdot y\right) \cdot t \le -4.20560211460467888 \cdot 10^{58}:\\ \;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\ \mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le 0.0:\\ \;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\ \mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le 2.8915212837881257 \cdot 10^{305}:\\ \;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\ \end{array}\]
\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;\left(x \cdot y - z \cdot y\right) \cdot t \le -4.20560211460467888 \cdot 10^{58}:\\
\;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\

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

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

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

\end{array}
double f(double x, double y, double z, double t) {
        double r521135 = x;
        double r521136 = y;
        double r521137 = r521135 * r521136;
        double r521138 = z;
        double r521139 = r521138 * r521136;
        double r521140 = r521137 - r521139;
        double r521141 = t;
        double r521142 = r521140 * r521141;
        return r521142;
}

double f(double x, double y, double z, double t) {
        double r521143 = x;
        double r521144 = y;
        double r521145 = r521143 * r521144;
        double r521146 = z;
        double r521147 = r521146 * r521144;
        double r521148 = r521145 - r521147;
        double r521149 = t;
        double r521150 = r521148 * r521149;
        double r521151 = -4.205602114604679e+58;
        bool r521152 = r521150 <= r521151;
        double r521153 = r521149 * r521144;
        double r521154 = r521143 - r521146;
        double r521155 = r521153 * r521154;
        double r521156 = 1.0;
        double r521157 = pow(r521155, r521156);
        double r521158 = 0.0;
        bool r521159 = r521150 <= r521158;
        double r521160 = r521154 * r521149;
        double r521161 = r521144 * r521160;
        double r521162 = 2.8915212837881257e+305;
        bool r521163 = r521150 <= r521162;
        double r521164 = r521163 ? r521150 : r521157;
        double r521165 = r521159 ? r521161 : r521164;
        double r521166 = r521152 ? r521157 : r521165;
        return r521166;
}

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.2
Target3.3
Herbie1.7
\[\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 3 regimes
  2. if (* (- (* x y) (* z y)) t) < -4.205602114604679e+58 or 2.8915212837881257e+305 < (* (- (* x y) (* z y)) t)

    1. Initial program 23.1

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

      \[\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*23.8

      \[\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 pow123.8

      \[\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 pow123.8

      \[\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-down23.8

      \[\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 pow123.8

      \[\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 pow123.8

      \[\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-down23.8

      \[\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-down23.8

      \[\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. Simplified2.8

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

    if -4.205602114604679e+58 < (* (- (* x y) (* z y)) t) < 0.0

    1. Initial program 3.3

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

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

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

    if 0.0 < (* (- (* x y) (* z y)) t) < 2.8915212837881257e+305

    1. Initial program 0.4

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x \cdot y - z \cdot y\right) \cdot t \le -4.20560211460467888 \cdot 10^{58}:\\ \;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\ \mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le 0.0:\\ \;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\ \mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le 2.8915212837881257 \cdot 10^{305}:\\ \;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\ \end{array}\]

Reproduce

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