Average Error: 14.2 → 1.3
Time: 23.9s
Precision: 64
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -5.642393041080093 \cdot 10^{+222}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.6734937234563832 \cdot 10^{-136}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 3.901570766735857 \cdot 10^{-242}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.6379485473061088 \cdot 10^{+137}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array}\]
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\begin{array}{l}
\mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -5.642393041080093 \cdot 10^{+222}:\\
\;\;\;\;\frac{x}{z} \cdot y\\

\mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.6734937234563832 \cdot 10^{-136}:\\
\;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\

\mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 3.901570766735857 \cdot 10^{-242}:\\
\;\;\;\;\frac{x}{z} \cdot y\\

\mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.6379485473061088 \cdot 10^{+137}:\\
\;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{z}\\

\end{array}
double f(double x, double y, double z, double t) {
        double r2801594 = x;
        double r2801595 = y;
        double r2801596 = z;
        double r2801597 = r2801595 / r2801596;
        double r2801598 = t;
        double r2801599 = r2801597 * r2801598;
        double r2801600 = r2801599 / r2801598;
        double r2801601 = r2801594 * r2801600;
        return r2801601;
}

double f(double x, double y, double z, double t) {
        double r2801602 = y;
        double r2801603 = z;
        double r2801604 = r2801602 / r2801603;
        double r2801605 = t;
        double r2801606 = r2801604 * r2801605;
        double r2801607 = r2801606 / r2801605;
        double r2801608 = -5.642393041080093e+222;
        bool r2801609 = r2801607 <= r2801608;
        double r2801610 = x;
        double r2801611 = r2801610 / r2801603;
        double r2801612 = r2801611 * r2801602;
        double r2801613 = -2.6734937234563832e-136;
        bool r2801614 = r2801607 <= r2801613;
        double r2801615 = r2801610 * r2801607;
        double r2801616 = 3.901570766735857e-242;
        bool r2801617 = r2801607 <= r2801616;
        double r2801618 = 1.6379485473061088e+137;
        bool r2801619 = r2801607 <= r2801618;
        double r2801620 = r2801602 * r2801610;
        double r2801621 = r2801620 / r2801603;
        double r2801622 = r2801619 ? r2801615 : r2801621;
        double r2801623 = r2801617 ? r2801612 : r2801622;
        double r2801624 = r2801614 ? r2801615 : r2801623;
        double r2801625 = r2801609 ? r2801612 : r2801624;
        return r2801625;
}

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

Derivation

  1. Split input into 3 regimes
  2. if (/ (* (/ y z) t) t) < -5.642393041080093e+222 or -2.6734937234563832e-136 < (/ (* (/ y z) t) t) < 3.901570766735857e-242

    1. Initial program 25.5

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified1.8

      \[\leadsto \color{blue}{\frac{x}{z} \cdot y}\]

    if -5.642393041080093e+222 < (/ (* (/ y z) t) t) < -2.6734937234563832e-136 or 3.901570766735857e-242 < (/ (* (/ y z) t) t) < 1.6379485473061088e+137

    1. Initial program 0.6

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]

    if 1.6379485473061088e+137 < (/ (* (/ y z) t) t)

    1. Initial program 35.6

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified2.9

      \[\leadsto \color{blue}{\frac{x}{z} \cdot y}\]
    3. Using strategy rm
    4. Applied *-un-lft-identity2.9

      \[\leadsto \frac{x}{\color{blue}{1 \cdot z}} \cdot y\]
    5. Applied add-cube-cbrt4.1

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{1 \cdot z} \cdot y\]
    6. Applied times-frac4.1

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

      \[\leadsto \color{blue}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1} \cdot \left(\frac{\sqrt[3]{x}}{z} \cdot y\right)}\]
    8. Taylor expanded around 0 3.2

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -5.642393041080093 \cdot 10^{+222}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.6734937234563832 \cdot 10^{-136}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 3.901570766735857 \cdot 10^{-242}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.6379485473061088 \cdot 10^{+137}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array}\]

Reproduce

herbie shell --seed 2019132 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))