Average Error: 6.8 → 0.3
Time: 3.1s
Precision: 64
\[\left(x \cdot y - z \cdot y\right) \cdot t\]
\[\begin{array}{l} \mathbf{if}\;x \cdot y - z \cdot y \le -1.1216381272031817 \cdot 10^{279}:\\ \;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\ \mathbf{elif}\;x \cdot y - z \cdot y \le -2.45676478580699958 \cdot 10^{-247}:\\ \;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\ \mathbf{elif}\;x \cdot y - z \cdot y \le 1.88712653588383372 \cdot 10^{-270}:\\ \;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\ \mathbf{elif}\;x \cdot y - z \cdot y \le 2.09756000476907307 \cdot 10^{298}:\\ \;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\ \end{array}\]
\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -1.1216381272031817 \cdot 10^{279}:\\
\;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\

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

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

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

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

\end{array}
double f(double x, double y, double z, double t) {
        double r531017 = x;
        double r531018 = y;
        double r531019 = r531017 * r531018;
        double r531020 = z;
        double r531021 = r531020 * r531018;
        double r531022 = r531019 - r531021;
        double r531023 = t;
        double r531024 = r531022 * r531023;
        return r531024;
}

double f(double x, double y, double z, double t) {
        double r531025 = x;
        double r531026 = y;
        double r531027 = r531025 * r531026;
        double r531028 = z;
        double r531029 = r531028 * r531026;
        double r531030 = r531027 - r531029;
        double r531031 = -1.1216381272031817e+279;
        bool r531032 = r531030 <= r531031;
        double r531033 = t;
        double r531034 = r531033 * r531026;
        double r531035 = r531025 - r531028;
        double r531036 = r531034 * r531035;
        double r531037 = 1.0;
        double r531038 = pow(r531036, r531037);
        double r531039 = -2.4567647858069996e-247;
        bool r531040 = r531030 <= r531039;
        double r531041 = r531030 * r531033;
        double r531042 = 1.8871265358838337e-270;
        bool r531043 = r531030 <= r531042;
        double r531044 = r531035 * r531033;
        double r531045 = r531026 * r531044;
        double r531046 = 2.097560004769073e+298;
        bool r531047 = r531030 <= r531046;
        double r531048 = r531047 ? r531041 : r531045;
        double r531049 = r531043 ? r531045 : r531048;
        double r531050 = r531040 ? r531041 : r531049;
        double r531051 = r531032 ? r531038 : r531050;
        return r531051;
}

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

Original6.8
Target3.0
Herbie0.3
\[\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)) < -1.1216381272031817e+279

    1. Initial program 47.3

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

      \[\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. Using strategy rm
    5. Applied pow147.6

      \[\leadsto \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 \color{blue}{{t}^{1}}\]
    6. Applied pow147.6

      \[\leadsto \left(\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}\right)}^{1}}\right) \cdot {t}^{1}\]
    7. Applied pow147.6

      \[\leadsto \left(\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}\right)}^{1}\right) \cdot {t}^{1}\]
    8. Applied pow147.6

      \[\leadsto \left(\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}\right)}^{1}\right) \cdot {t}^{1}\]
    9. Applied pow-prod-down47.6

      \[\leadsto \left(\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}\right)}^{1}\right) \cdot {t}^{1}\]
    10. Applied pow-prod-down47.6

      \[\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)}^{1}} \cdot {t}^{1}\]
    11. Applied pow-prod-down47.6

      \[\leadsto \color{blue}{{\left(\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\right)}^{1}}\]
    12. Simplified0.3

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

    if -1.1216381272031817e+279 < (- (* x y) (* z y)) < -2.4567647858069996e-247 or 1.8871265358838337e-270 < (- (* x y) (* z y)) < 2.097560004769073e+298

    1. Initial program 0.2

      \[\left(x \cdot y - z \cdot y\right) \cdot t\]

    if -2.4567647858069996e-247 < (- (* x y) (* z y)) < 1.8871265358838337e-270 or 2.097560004769073e+298 < (- (* x y) (* z y))

    1. Initial program 30.6

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y - z \cdot y \le -1.1216381272031817 \cdot 10^{279}:\\ \;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\ \mathbf{elif}\;x \cdot y - z \cdot y \le -2.45676478580699958 \cdot 10^{-247}:\\ \;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\ \mathbf{elif}\;x \cdot y - z \cdot y \le 1.88712653588383372 \cdot 10^{-270}:\\ \;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\ \mathbf{elif}\;x \cdot y - z \cdot y \le 2.09756000476907307 \cdot 10^{298}:\\ \;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\ \end{array}\]

Reproduce

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