Average Error: 14.6 → 0.7
Time: 10.3s
Precision: 64
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -6.34231097128044137 \cdot 10^{248}:\\ \;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\ \mathbf{elif}\;\frac{y}{z} \le -1.37884780012777875 \cdot 10^{-243}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 1.9689524893479902 \cdot 10^{-215}:\\ \;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\ \mathbf{elif}\;\frac{y}{z} \le 1.6330625977565216 \cdot 10^{139}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z} \cdot \left(x \cdot y\right)\\ \end{array}\]
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -6.34231097128044137 \cdot 10^{248}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\

\mathbf{elif}\;\frac{y}{z} \le -1.37884780012777875 \cdot 10^{-243}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{elif}\;\frac{y}{z} \le 1.9689524893479902 \cdot 10^{-215}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\

\mathbf{elif}\;\frac{y}{z} \le 1.6330625977565216 \cdot 10^{139}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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

\end{array}
double f(double x, double y, double z, double t) {
        double r88927 = x;
        double r88928 = y;
        double r88929 = z;
        double r88930 = r88928 / r88929;
        double r88931 = t;
        double r88932 = r88930 * r88931;
        double r88933 = r88932 / r88931;
        double r88934 = r88927 * r88933;
        return r88934;
}

double f(double x, double y, double z, double __attribute__((unused)) t) {
        double r88935 = y;
        double r88936 = z;
        double r88937 = r88935 / r88936;
        double r88938 = -6.342310971280441e+248;
        bool r88939 = r88937 <= r88938;
        double r88940 = 1.0;
        double r88941 = x;
        double r88942 = r88941 * r88935;
        double r88943 = r88936 / r88942;
        double r88944 = r88940 / r88943;
        double r88945 = -1.3788478001277788e-243;
        bool r88946 = r88937 <= r88945;
        double r88947 = r88941 * r88937;
        double r88948 = 1.9689524893479902e-215;
        bool r88949 = r88937 <= r88948;
        double r88950 = 1.6330625977565216e+139;
        bool r88951 = r88937 <= r88950;
        double r88952 = r88940 / r88936;
        double r88953 = r88952 * r88942;
        double r88954 = r88951 ? r88947 : r88953;
        double r88955 = r88949 ? r88944 : r88954;
        double r88956 = r88946 ? r88947 : r88955;
        double r88957 = r88939 ? r88944 : r88956;
        return r88957;
}

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) < -6.342310971280441e+248 or -1.3788478001277788e-243 < (/ y z) < 1.9689524893479902e-215

    1. Initial program 22.7

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified0.3

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    3. Using strategy rm
    4. Applied clear-num0.8

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

    if -6.342310971280441e+248 < (/ y z) < -1.3788478001277788e-243 or 1.9689524893479902e-215 < (/ y z) < 1.6330625977565216e+139

    1. Initial program 8.2

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified9.6

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{1 \cdot z}}\]
    5. Applied times-frac0.2

      \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y}{z}}\]
    6. Simplified0.2

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

    if 1.6330625977565216e+139 < (/ y z)

    1. Initial program 33.1

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    3. Using strategy rm
    4. Applied associate-/l*14.8

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]
    5. Using strategy rm
    6. Applied div-inv14.9

      \[\leadsto \frac{x}{\color{blue}{z \cdot \frac{1}{y}}}\]
    7. Applied *-un-lft-identity14.9

      \[\leadsto \frac{\color{blue}{1 \cdot x}}{z \cdot \frac{1}{y}}\]
    8. Applied times-frac3.1

      \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{x}{\frac{1}{y}}}\]
    9. Simplified3.0

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -6.34231097128044137 \cdot 10^{248}:\\ \;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\ \mathbf{elif}\;\frac{y}{z} \le -1.37884780012777875 \cdot 10^{-243}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 1.9689524893479902 \cdot 10^{-215}:\\ \;\;\;\;\frac{1}{\frac{z}{x \cdot y}}\\ \mathbf{elif}\;\frac{y}{z} \le 1.6330625977565216 \cdot 10^{139}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z} \cdot \left(x \cdot y\right)\\ \end{array}\]

Reproduce

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