Average Error: 14.3 → 0.4
Time: 13.4s
Precision: 64
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -5.49778287371169 \cdot 10^{+261}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -7.858505420200056 \cdot 10^{-207}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;\frac{y}{z} \le 9.366075407571311 \cdot 10^{-161}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 4.0902183033222777 \cdot 10^{+188}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \end{array}\]
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\begin{array}{l}
\mathbf{if}\;\frac{y}{z} \le -5.49778287371169 \cdot 10^{+261}:\\
\;\;\;\;\frac{x \cdot y}{z}\\

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

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

\mathbf{elif}\;\frac{y}{z} \le 4.0902183033222777 \cdot 10^{+188}:\\
\;\;\;\;\frac{y}{z} \cdot x\\

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

\end{array}
double f(double x, double y, double z, double t) {
        double r4468890 = x;
        double r4468891 = y;
        double r4468892 = z;
        double r4468893 = r4468891 / r4468892;
        double r4468894 = t;
        double r4468895 = r4468893 * r4468894;
        double r4468896 = r4468895 / r4468894;
        double r4468897 = r4468890 * r4468896;
        return r4468897;
}

double f(double x, double y, double z, double __attribute__((unused)) t) {
        double r4468898 = y;
        double r4468899 = z;
        double r4468900 = r4468898 / r4468899;
        double r4468901 = -5.49778287371169e+261;
        bool r4468902 = r4468900 <= r4468901;
        double r4468903 = x;
        double r4468904 = r4468903 * r4468898;
        double r4468905 = r4468904 / r4468899;
        double r4468906 = -7.858505420200056e-207;
        bool r4468907 = r4468900 <= r4468906;
        double r4468908 = r4468900 * r4468903;
        double r4468909 = 9.366075407571311e-161;
        bool r4468910 = r4468900 <= r4468909;
        double r4468911 = 4.0902183033222777e+188;
        bool r4468912 = r4468900 <= r4468911;
        double r4468913 = r4468903 / r4468899;
        double r4468914 = r4468913 * r4468898;
        double r4468915 = r4468912 ? r4468908 : r4468914;
        double r4468916 = r4468910 ? r4468905 : r4468915;
        double r4468917 = r4468907 ? r4468908 : r4468916;
        double r4468918 = r4468902 ? r4468905 : r4468917;
        return r4468918;
}

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) < -5.49778287371169e+261 or -7.858505420200056e-207 < (/ y z) < 9.366075407571311e-161

    1. Initial program 20.9

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

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

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

    if -5.49778287371169e+261 < (/ y z) < -7.858505420200056e-207 or 9.366075407571311e-161 < (/ y z) < 4.0902183033222777e+188

    1. Initial program 8.2

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

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}}\]
    5. Using strategy rm
    6. Applied associate-/l*9.7

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}}\]
    7. Using strategy rm
    8. Applied associate-/r/0.2

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

    if 4.0902183033222777e+188 < (/ y z)

    1. Initial program 38.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -5.49778287371169 \cdot 10^{+261}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -7.858505420200056 \cdot 10^{-207}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;\frac{y}{z} \le 9.366075407571311 \cdot 10^{-161}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 4.0902183033222777 \cdot 10^{+188}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \end{array}\]

Reproduce

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