Average Error: 14.6 → 1.8
Time: 10.7s
Precision: 64
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -7.657111701178940777012861820082087700041 \cdot 10^{198}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.546781552442980009772678360076582367412 \cdot 10^{-137}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 5.245049798274293957912975359369120889594 \cdot 10^{-102}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.983801995551396888093353762194298415423 \cdot 10^{200}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot \frac{1}{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 -7.657111701178940777012861820082087700041 \cdot 10^{198}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\

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

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

\mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.983801995551396888093353762194298415423 \cdot 10^{200}:\\
\;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\

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

\end{array}
double f(double x, double y, double z, double t) {
        double r81723 = x;
        double r81724 = y;
        double r81725 = z;
        double r81726 = r81724 / r81725;
        double r81727 = t;
        double r81728 = r81726 * r81727;
        double r81729 = r81728 / r81727;
        double r81730 = r81723 * r81729;
        return r81730;
}

double f(double x, double y, double z, double t) {
        double r81731 = y;
        double r81732 = z;
        double r81733 = r81731 / r81732;
        double r81734 = t;
        double r81735 = r81733 * r81734;
        double r81736 = r81735 / r81734;
        double r81737 = -7.657111701178941e+198;
        bool r81738 = r81736 <= r81737;
        double r81739 = x;
        double r81740 = r81732 / r81739;
        double r81741 = r81731 / r81740;
        double r81742 = -2.54678155244298e-137;
        bool r81743 = r81736 <= r81742;
        double r81744 = r81739 * r81736;
        double r81745 = 5.245049798274294e-102;
        bool r81746 = r81736 <= r81745;
        double r81747 = 1.983801995551397e+200;
        bool r81748 = r81736 <= r81747;
        double r81749 = r81731 * r81739;
        double r81750 = 1.0;
        double r81751 = r81750 / r81732;
        double r81752 = r81749 * r81751;
        double r81753 = r81748 ? r81744 : r81752;
        double r81754 = r81746 ? r81741 : r81753;
        double r81755 = r81743 ? r81744 : r81754;
        double r81756 = r81738 ? r81741 : r81755;
        return r81756;
}

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) < -7.657111701178941e+198 or -2.54678155244298e-137 < (/ (* (/ y z) t) t) < 5.245049798274294e-102

    1. Initial program 21.8

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

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

      \[\leadsto \color{blue}{\left(y \cdot x\right) \cdot \frac{1}{z}}\]
    5. Using strategy rm
    6. Applied pow12.3

      \[\leadsto \left(y \cdot x\right) \cdot \color{blue}{{\left(\frac{1}{z}\right)}^{1}}\]
    7. Applied pow12.3

      \[\leadsto \left(y \cdot \color{blue}{{x}^{1}}\right) \cdot {\left(\frac{1}{z}\right)}^{1}\]
    8. Applied pow12.3

      \[\leadsto \left(\color{blue}{{y}^{1}} \cdot {x}^{1}\right) \cdot {\left(\frac{1}{z}\right)}^{1}\]
    9. Applied pow-prod-down2.3

      \[\leadsto \color{blue}{{\left(y \cdot x\right)}^{1}} \cdot {\left(\frac{1}{z}\right)}^{1}\]
    10. Applied pow-prod-down2.3

      \[\leadsto \color{blue}{{\left(\left(y \cdot x\right) \cdot \frac{1}{z}\right)}^{1}}\]
    11. Simplified2.6

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

    if -7.657111701178941e+198 < (/ (* (/ y z) t) t) < -2.54678155244298e-137 or 5.245049798274294e-102 < (/ (* (/ y z) t) t) < 1.983801995551397e+200

    1. Initial program 0.6

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

    if 1.983801995551397e+200 < (/ (* (/ y z) t) t)

    1. Initial program 46.2

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}}\]
    3. Using strategy rm
    4. Applied div-inv3.1

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -7.657111701178940777012861820082087700041 \cdot 10^{198}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.546781552442980009772678360076582367412 \cdot 10^{-137}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 5.245049798274293957912975359369120889594 \cdot 10^{-102}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.983801995551396888093353762194298415423 \cdot 10^{200}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot \frac{1}{z}\\ \end{array}\]

Reproduce

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